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 <1508840467.45.0.213398074469.issue30768@psf.upfronthosting.co.za>
In-reply-to
Content
interrupted_lock.py: test threading.Lock.acquire(timeout=1.0) with SIGALRM sent every 1 ms (so up to 1000 times in total). Example:

haypo@selma$ ./python interrupted_lock.py 
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 */
    sigfillset(&set);
    pthread_sigmask(SIG_SETMASK, &set, NULL);
History
Date User Action Args
2017-10-24 10:21:07vstinnersetrecipients: + vstinner, pitrou, neologix
2017-10-24 10:21:07vstinnersetmessageid: <1508840467.45.0.213398074469.issue30768@psf.upfronthosting.co.za>
2017-10-24 10:21:07vstinnerlinkissue30768 messages
2017-10-24 10:21:07vstinnercreate