-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Update thread_foobar.h to include timed locking and TLS support #65511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The thread_foobar.h reference for the interface for abstracting the platform-specific thread implementation does not include newer features such as timed locking and TLS support. |
Missed a word in a comment |
You may want to provide an implementation of PyThread_acquire_lock() that simply defers to PyThread_acquire_lock_timed() (see thread_pthread.h, which does the same). |
Added an example of deferring to PyThread_acquire_lock_timed in PyThread_acquire_lock. Also fixed a mistake in the string of a dprintf in PyThread_acquire_lock_timed. |
Hum, your comment about deferring is wrong, since thread_nt.h also does the deferring: int
PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag)
{
return PyThread_acquire_lock_timed(aLock, waitflag ? -1 : 0, 0);
} |
Oops... I removed that and just put the deferral in there. |
Thanks! The patch looks good to me, I'll let it sleep a bit to see if other people have an opinion. |
New changeset 7bb1bda5dcef by Antoine Pitrou in branch 'default': |
Ok, noone chimed in, so I committed the patch :-) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: