Open GoogleCodeExporter opened 9 years ago
so, you means only auto create JSLocker in the __enter__ method? or let's you
decide when to lock it?
Original comment by flier...@gmail.com
on 30 Apr 2013 at 1:11
Surprise! Why JSContext enters the lock in the constructor?
I think about too a scenario where the JSContext is created once someware,
evals some javascript code and cached for future reuse.
ctx = JSContext()
ctx.eval(jscode)
...
def execute(param):
with JSLocker(): # Do I need it?
with ctx:
ctx.locals.param = param;
return ctx.eval('some_function(param)')
Does it works as expected?
ps: Could I wrap the ctx with JSIsolate() instead JSLocker() in this case?
Original comment by e.generalov
on 12 Jun 2013 at 9:21
Original issue reported on code.google.com by
melit.st...@gmail.com
on 29 Apr 2013 at 6:37