Closed narategithub closed 11 months ago
@narategithub What symptom does this specifically fix? When the timeout is NULL? Is there some other race this addresses?
@tom95858 The issue before this patch was the timeout
wasn't used at all. The function always return either 0 or EBUSY right away. This patch made it a blocking call if timeout
is NULL
, and condition-wait for a specific time if timeout
is given as described in the existing document of the function.
dsos_transaction_begin()
should be a 'blocking' call if thetimeout
argument is NULL, or a timed-wait call iftimeout
parameter is given.REMARK: The 'nogil' patch in the Cython code is to release the Python's Global Interpreter Lock (GIL) before we call (with a chance of blocking) the dsos transaction functions. Otherwise, other Python's threads could not proceed since the blocking-caller was also holding the GIL.