-
Notifications
You must be signed in to change notification settings - Fork 68
Delay between thread creation and thread created event is noticeably long #106
Comments
I wonder if what's happening here is that the worker threads are hammering CPU, and so the background thread that processes messages gets throttled down? |
Although with a 1 sec delay this shouldn't be happening. But I'm generally curious whether the delay is in pydevd generating the message, or in our code receiving it. |
This is the code that i was running to test:
|
@int19h @karthiknadig Problem:
What about monkey patching, same as older version of PTVSD did?
Fix
So the real question is why isn't pydevd reporting threads as they are reported? Why isn't the monkey patching working
Oh yes, finally we're going to have to have a very careful look at how we structure (have) the code. |
Unfortunately the threads reported contain the wrong names ( |
@karthiknadig I believe the recent changes made by @ericsnowcurrently may have resolved this. Previously we were importing the |
Confirmed that this still exists, and the PR #430 fixes this. |
Fixes #106 * When a thread is created, notify about it as soon as possible. * Properly mark internal threads as pydevd daemon threads. Also fix tests to consider that the event related to thread creation is given as the thread starts to run. * Fix test flakiness and improve error message when messages are not equal.
I added
print('Created [%d]: %s' % (tid, pyd_tid))
toon_pydevd_thread_create
to demonstrate this issue. Each of the worker threads here wait for 1 second before printing.The text was updated successfully, but these errors were encountered: