|
|
@ -88,8 +88,8 @@ class Corker(object):
|
|
|
|
unrecoverably snapshotted in the locked state in the fork child, causing
|
|
|
|
unrecoverably snapshotted in the locked state in the fork child, causing
|
|
|
|
deadlocks at random future moments.
|
|
|
|
deadlocks at random future moments.
|
|
|
|
|
|
|
|
|
|
|
|
To ensure a target thread has all locks dropped, we ask it to write a large
|
|
|
|
To ensure a target thread has all locks dropped, it is made to write a
|
|
|
|
string to a socket with a small buffer that has :data:`os.O_NONBLOCK`
|
|
|
|
large string to a socket with a small buffer that has :data:`os.O_NONBLOCK`
|
|
|
|
disabled. CPython will drop the GIL and enter the ``write()`` system call,
|
|
|
|
disabled. CPython will drop the GIL and enter the ``write()`` system call,
|
|
|
|
where it will block until the socket buffer is drained, or the write side
|
|
|
|
where it will block until the socket buffer is drained, or the write side
|
|
|
|
is closed.
|
|
|
|
is closed.
|
|
|
|