Message33941
| Author |
cgw |
| Recipients |
| Date |
2000年08月19日.04:46:34 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
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.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:01:18 | admin | link | issue401226 messages |
| 2007年08月23日 15:01:18 | admin | create |
|