()
| 192 | |
| 193 | |
| 194 | def is_main_thread(): |
| 195 | if six.PY2: |
| 196 | return isinstance(threading.current_thread(), threading._MainThread) |
| 197 | else: |
| 198 | # a nicer solution with py3 |
| 199 | return threading.current_thread() == threading.main_thread() |
| 200 | |
| 201 | |
| 202 | @contextmanager |
no outgoing calls
no test coverage detected
searching dependent graphs…