Message304892
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); |
|
Date |
User |
Action |
Args |
2017-10-24 10:21:07 | vstinner | set | recipients:
+ vstinner, pitrou, neologix |
2017-10-24 10:21:07 | vstinner | set | messageid: <1508840467.45.0.213398074469.issue30768@psf.upfronthosting.co.za> |
2017-10-24 10:21:07 | vstinner | link | issue30768 messages |
2017-10-24 10:21:07 | vstinner | create | |
|