def update_all_thread_stacks(blocking_thread):
THREADS_LOCK.acquire()
all_threads = list(THREADS.values())
THREADS_LOCK.release()
for cur_thread in all_threads:
if cur_thread is blocking_thread:
continue
cur_thread._block_starting_lock.acquire()
if not cur_thread._is_blocked:
# release the lock, we're going to run user code to evaluate the frames
cur_thread._block_starting_lock.release()
frames = cur_thread.get_frame_list()
# re-acquire the lock and make sure we're still not blocked. If so send
# the frame list.
cur_thread._block_starting_lock.acquire()
if not cur_thread._is_blocked:
cur_thread.send_frame_list(frames)
cur_thread._block_starting_lock.release()
评论列表
文章目录