消息 [109883]
Here's a patch that makes Python-level lock acquisitions interruptible for py3k. There are many users of the C-level lock API, most of whom are not set up to deal with lock acquisition failure. I decided to make a new API function and leave the others alone.
If possible, I think this should go out with 3.2.
In that case, I was wondering if I should merge PyThread_acquire_lock_timed with my new PyThread_acquire_lock_timed_intr, since PyThread_acquire_lock_timed wasn't available in 3.1. Although it did go out in 2.7, we don't promise C API compatibility with the 2.x series, so I don't think it matters.
I've tested this patch on Mac OS X and Linux. The whole test suite passes on both, along with the test that I added to test_threadsignals.py.
I added a noop compatibility wrapper to thread_nt.h, but I haven't tested it or built it. When I get around to testing/fixing the subprocess patch on Windows, I'll make sure this works and the test is skipped. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2010-07-10 15:47:47 | rnk | 修改 | recipients:
+ rnk, gregory.p.smith, pitrou, jyasskin, hobb0001 |
| 2010-07-10 15:47:47 | rnk | 修改 | messageid: <1278776867.58.0.64335416345.issue8844@psf.upfronthosting.co.za> |
| 2010-07-10 15:47:46 | rnk | 链接 | issue8844 messages |
| 2010-07-10 15:47:45 | rnk | 创建 | |
|