homepage

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.

Author kristjan.jonsson
Recipients gregory.p.smith, kristjan.jonsson, meador.inge, pitrou, trent
Date 2013年05月06日.09:35:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367832921.25.0.300064169781.issue16742@psf.upfronthosting.co.za>
In-reply-to
Content
My quick and dirty fix is simple:
 _PyOS_ReadlineTState = PyThreadState_GET();
 /* CCP change, cannot release the GIL here because PyOS_StdioReadline uses
 * the regular MALLOC
 */
 /*
 Py_BEGIN_ALLOW_THREADS
 */
#ifdef WITH_THREAD
 PyThread_acquire_lock(_PyOS_ReadlineLock, 1);
#endif
 /* This is needed to handle the unlikely case that the
 * interpreter is in interactive mode *and* stdin/out are not
 * a tty. This can happen, for example if python is run like
 * this: python -i < test1.py
 */
 if (!isatty (fileno (sys_stdin)) || !isatty (fileno (sys_stdout)))
 rv = PyOS_StdioReadline (sys_stdin, sys_stdout, prompt);
 else
 rv = (*PyOS_ReadlineFunctionPointer)(sys_stdin, sys_stdout,
 prompt);
 /*
 Py_END_ALLOW_THREADS
 */
#ifdef WITH_THREAD
 PyThread_release_lock(_PyOS_ReadlineLock);
#endif
Basically, we just comment out the lock release since we don't need it. The reason we found this was that we were using GIL a custom mallocator which should have been run with the GIL but wasn ́t.
History
Date User Action Args
2013年05月06日 09:35:21kristjan.jonssonsetrecipients: + kristjan.jonsson, gregory.p.smith, pitrou, trent, meador.inge
2013年05月06日 09:35:21kristjan.jonssonsetmessageid: <1367832921.25.0.300064169781.issue16742@psf.upfronthosting.co.za>
2013年05月06日 09:35:21kristjan.jonssonlinkissue16742 messages
2013年05月06日 09:35:21kristjan.jonssoncreate

AltStyle によって変換されたページ (->オリジナル) /