Prev Next

Even if we have long-running requests (database requests, etc.), we don't want to block other users out while those requests are running. We'd like to have:


A ()
B () # B may be long-running, service other requests
C ()

Or:


A ()
B (
lambda : C ())

But because of syntactic restrictions of Python, we get:


A
def C():
...
B(C)