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 lemburg
Recipients brian.curtin, jnoller, lemburg, nascheme, rcohen, schmir
Date 2010-01-22.09:32:29
SpamBayes Score 8.715251e-15
Marked as misclassified No
Message-id <1264152753.17.0.656147876949.issue7753@psf.upfronthosting.co.za>
In-reply-to
Content
A few things:

 * The ceval_gil.h file is missing from the patch.

 * Please check whether you can move these variable declarations inside the main loop function (as statics):

+/* This single variable consolidates all requests to break out of the fast path
+   in the eval loop. */
+static volatile int eval_breaker = 0;
+/* Request for droppping the GIL */
+static volatile int gil_drop_request = 0;
+/* Request for running pending calls */
+static volatile int pendingcalls_to_do = 0; 
+/* Request for looking at the `async_exc` field of the current thread state */
+static volatile int pending_async_exc = 0;

 * Instead of deprecating the set/getcheckinterval APIs, convert the arguments passed to these to the switch interval. The new APIs set/getswitchinteral are then not needed.

 * Please add the fallback solutions from the time module in case gettimeofday() is not available. You cannot assume that "all modern POSIX systems" implement that API - it was introduced in POSIX 2001 and Python 2.x still supports OSes that were released prior to that year.

 * Note that gettimeofday() et al. are rather slow APIs on most systems. It would be better to directly use a simple performance timer since we don't really need any timing accuracy in managing the GIL when run with threads. Have a look at the clock_gettime() API for ways of accessing such timers. There may also be other ways of accessing such times via pthreads.

 * I haven't looked at the timing details of the implementation, but please make sure that it works even if the clock interval is a few ms (while gettimeofday() provides us resolution, the system clock may still only tick in ms intervals - another reason to use CPU performance timers instead).

Thanks.
History
Date User Action Args
2010-01-22 09:32:36lemburgsetrecipients: + lemburg, nascheme, schmir, jnoller, brian.curtin, rcohen
2010-01-22 09:32:33lemburgsetmessageid: <1264152753.17.0.656147876949.issue7753@psf.upfronthosting.co.za>
2010-01-22 09:32:31lemburglinkissue7753 messages
2010-01-22 09:32:29lemburgcreate