Skip to content

Thread suspend policy for multi-threaded applications #18347

Answered by fabioz
jonasehrlich asked this question in Q&A
Discussion options

You must be logged in to vote

As a note, the steppingResumesAllThreads enables making the step only in a single thread without resuming others, but it won't change the behavior that upon hitting a breakpoint all threads are suspended as the behavior is always pausing all threads upon a breakpoint hit...

For this case there are 2 options:

  1. Set an environment variable such as PYDEVD_UNBLOCK_THREADS_TIMEOUT=0 (you may also set a timeout if you wish as 0 will make it resume all threads when the evaluation begins and not only after a given timeout). This will make other threads (all except the one where the evaluation was requested) run during the evaluation (this was done specifically for the use-case you're working with…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jonasehrlich
Comment options

@akr-amd
Comment options

Answer selected by jonasehrlich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants