-
Notifications
You must be signed in to change notification settings - Fork 50
Nested concurrency #46
Copy link
Copy link
Open
Description
Is it possible to have a @Synchronised function whose body calls another function which is decorated with @Synchronised decorator?
from deco import *
from time import sleep
@concurrent
def bconc():
sleep(3)
return 1
@concurrent
def fconc():
sleep(10)
return 2
@synchronized
def bar():
bd={}
for i in range(5):
bd[i]=bconc()
return bd
@synchronized
def foo():
bd=bar()
fd={}
for i in range(5):
fd[i]=fconc()
return fd,bd
print foo()
site-packages\deco\conc.py", line 57, in __call__
out = compile(self.ast, "<string>", "exec")
TypeError: required field "lineno" missing from stmt
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels