Message33941
See http://www.lambdacs.com/newsgroup/FAQ.html#Q120
and "man pthread_atfork" for background.
I don't use a pthread_atfork handler here - the explicit
approach is more portable. However calling fork() from
C extensions could still cause trouble.
This patch causes the child to create a new interpreter
lock after doing a fork. It would be nice to deallocate
the old lock with PyThread_free_lock, but this does some
unwanted error-checking in addition to deallocating the
lock. So I waste a little memory instead. To really do
this cleanly one could add a new PyThread_reset_lock function to all the thread_*.h files, and use that instead.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:01:18 | admin | link | issue401226 messages |
2007-08-23 15:01:18 | admin | create | |
|