| 379 | NOTIFY_OF_PAUSE_TIMEOUT = 0.5 |
| 380 | |
| 381 | def __init__(self, py_db): |
| 382 | self._py_db = weakref.ref(py_db) |
| 383 | self._next_request_time = partial(next, itertools.count()) |
| 384 | self._last_suspend_notification_time = -1 |
| 385 | self._last_resume_notification_time = -1 |
| 386 | self._suspend_time_request = self._next_request_time() |
| 387 | self._lock = thread.allocate_lock() |
| 388 | self._suspended_thread_id_to_thread = {} |
| 389 | self._pause_requested = False |
| 390 | |
| 391 | def send_suspend_notification(self, thread_id, thread, stop_reason): |
| 392 | raise AssertionError("abstract: subclasses must override.") |