(thread)
| 667 | |
| 668 | |
| 669 | def get_thread_id(thread): |
| 670 | try: |
| 671 | # Fast path without getting lock. |
| 672 | tid = thread.__pydevd_id__ |
| 673 | if tid is None: |
| 674 | # Fix for https://www.brainwy.com/tracker/PyDev/645 |
| 675 | # if __pydevd_id__ is None, recalculate it... also, use an heuristic |
| 676 | # that gives us always the same id for the thread (using thread.ident or id(thread)). |
| 677 | raise AttributeError() |
| 678 | except AttributeError: |
| 679 | tid = _get_or_compute_thread_id_with_lock(thread, is_current_thread=False) |
| 680 | |
| 681 | return tid |
| 682 | |
| 683 | |
| 684 | def set_thread_id(thread, thread_id): |
no test coverage detected