mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
merge in patch from tim golden to fix contextmanager support for mp.Lock()
This commit is contained in:
parent
d7bf8a5478
commit
82eb5902ce
4 changed files with 9 additions and 2 deletions
|
@ -546,7 +546,7 @@ static PyMethodDef semlock_methods[] = {
|
|||
"acquire the semaphore/lock"},
|
||||
{"release", (PyCFunction)semlock_release, METH_NOARGS,
|
||||
"release the semaphore/lock"},
|
||||
{"__enter__", (PyCFunction)semlock_acquire, METH_VARARGS,
|
||||
{"__enter__", (PyCFunction)semlock_acquire, METH_VARARGS | METH_KEYWORDS,
|
||||
"enter the semaphore/lock"},
|
||||
{"__exit__", (PyCFunction)semlock_release, METH_VARARGS,
|
||||
"exit the semaphore/lock"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue