This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2005年02月22日 19:04 by montulli, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg60673 - (view) | Author: Lou Montulli (montulli) | Date: 2005年02月22日 19:04 | |
This problem is described well by this post from '03 http://mail.python.org/pipermail/python-dev/2003-August/037729.html The problem still seems to exist. The solution described within the post will not work in all cases because if you do not call PyEval_ReleaseLock then other threads will be deadlocked, and if you do call PyEval_ReleaseLock, the thread that originally called InitThreads will be deadlocked. The only work around that I have found so far is to use a separate thread that will never call scripts call InitThreads and then PyEval_ReleaseLock. After that all threads will run correctly, but the thread that originally called InitThreads cannot run python. Feel free to contact me for any other details, or call me a bonehead if I screwed something up. lou a montulli o org |
|||
| msg109747 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年07月09日 15:10 | |
Anyone with Windows threading experience who could comment on this please, i.e. is it still an issue? |
|||
| msg109765 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2010年07月09日 16:38 | |
This issue looks invalid to me: PyEval_ReleaseLock manipulates the interpreter lock, but not the thread state. Both have to be released/reset before another thread can install its own thread state and run. In other words, PyEval_SaveThread() should be used instead (and PyEval_RestoreThread() at the end, but the example code does not care to finalize the interpreter) |
|||
| msg109830 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2010年07月10日 07:32 | |
This is actually the same issue as issue1720250 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:09 | admin | set | github: 41614 |
| 2010年07月10日 07:32:02 | amaury.forgeotdarc | set | status: open -> closed resolution: duplicate superseder: PyGILState_Ensure does not acquires GIL messages: + msg109830 |
| 2010年07月09日 16:38:01 | amaury.forgeotdarc | set | nosy:
+ amaury.forgeotdarc messages: + msg109765 |
| 2010年07月09日 15:10:54 | BreamoreBoy | set | versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6 |
| 2010年07月09日 15:10:14 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg109747 |
| 2009年02月16日 01:01:10 | ajaksu2 | set | title: Windows deadlock with PyEval_ReleaseLock -> Windows deadlock with PyEval_ReleaseLock stage: test needed type: behavior versions: + Python 2.6, - Python 2.4 |
| 2005年02月22日 19:04:55 | montulli | create | |