mirror of
https://github.com/python/cpython
synced 2024-09-16 02:40:00 +00:00
Added support for (optionally) bracketing calls with
Py_{BEGIN,END}_ALLOW_THREADS.
This commit is contained in:
parent
f3f231f60c
commit
b53355ad77
|
@ -216,6 +216,12 @@ def getargsFormatArgs(self, sep):
|
|||
def precheck(self):
|
||||
pass
|
||||
|
||||
def beginallowthreads(self):
|
||||
pass
|
||||
|
||||
def endallowthreads(self):
|
||||
pass
|
||||
|
||||
def callit(self):
|
||||
args = ""
|
||||
s = "%s%s(" % (self.getrvforcallit(), self.callname)
|
||||
|
@ -226,8 +232,10 @@ def callit(self):
|
|||
s = arg.passArgument()
|
||||
if args: s = sep + s
|
||||
args = args + s
|
||||
self.beginallowthreads()
|
||||
Output("%s%s(%s);",
|
||||
self.getrvforcallit(), self.callname, args)
|
||||
self.endallowthreads()
|
||||
|
||||
def getrvforcallit(self):
|
||||
if self.rv:
|
||||
|
|
Loading…
Reference in a new issue