Message79269
Ok, the test patch is fine!
Now looking at the main patch, some comments:
- you removed "volatile" from pendingfirst and pendinglast, is it really
safe?
- what if pending_lock is not initialized when Py_AddPendingCall is
called? I know it's unlikely, but imagine someone calling that function
just after the interpreter has been initialized
- the documentation should mention that the GIL must not be held when
Py_AddPendingCall is called, otherwise there can be a deadlock (is it a
change from previous versions by the way?)
- you should check the return value of PyThread_allocate_lock() for NULL
- is your implementation reentrant? that is, registering a callback from
a callback. There is no need for it to be, but if it aims to be, then it
should perhaps be documented and tested :) |
|
Date |
User |
Action |
Args |
2009-01-06 16:06:03 | pitrou | set | recipients:
+ pitrou, amaury.forgeotdarc, kristjan.jonsson, christian.heimes |
2009-01-06 16:06:03 | pitrou | set | messageid: <1231257963.24.0.41851450627.issue4293@psf.upfronthosting.co.za> |
2009-01-06 16:06:02 | pitrou | link | issue4293 messages |
2009-01-06 16:06:02 | pitrou | create | |
|