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 vstinner
Recipients neologix, pitrou, vstinner
Date 2017-10-24.10:21:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Content test threading.Lock.acquire(timeout=1.0) with SIGALRM sent every 1 ms (so up to 1000 times in total). Example:

haypo@selma$ ./python 
acquire(timeout=1.0) took 1.0 seconds and got 1000 signals

Oh, in fact, threading.Lock.acquire(timeout=1.0) already recomputes the timeout when interrupted.

In Python stdlib, PyThread_acquire_lock_timed() is only called from one place with intr_flag=0: faulthandler watchdog thread, but this thread blocks all signals:

    /* we don't want to receive any signal */
    pthread_sigmask(SIG_SETMASK, &set, NULL);
Date User Action Args
2017-10-24 10:21:07vstinnersetrecipients: + vstinner, pitrou, neologix
2017-10-24 10:21:07vstinnersetmessageid: <>
2017-10-24 10:21:07vstinnerlinkissue30768 messages
2017-10-24 10:21:07vstinnercreate