[New-bugs-announce] [issue4293] Thread Safe Py_AddPendingCall

Kristján Valur Jónsson report at bugs.python.org
Mon Nov 10 12:36:35 CET 2008


New submission from Kristján Valur Jónsson <kristjan at ccpgames.com>:

At CCP We have started using the Py_AddPendingCall() mechanism to 
signal python about a completed IO operation.
However, we noticed that the existing mechanism was hoplelessly un-
thread safe.  This is bad, since on Windows at least, it is very 
convenient to have such callbacks happen on an arbitrary thread from 
the system's thread pool.
I submit a thread-safe implementation instead to be used if WITH_THREAD 
is defined.
This allows Py_AddPendingCall() to be called from any thread, from any 
context, even from a PendingCall callback itself.

----------
components: Interpreter Core
files: pendingalls.patch
keywords: needs review, patch, patch
messages: 75691
nosy: krisvale
priority: normal
severity: normal
status: open
title: Thread Safe Py_AddPendingCall
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file11974/pendingalls.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4293>
_______________________________________


More information about the New-bugs-announce mailing list