Keep allocate_id() in the enhanced router class.
parent
02a37d2339
commit
c67119501b
@ -1,8 +1,10 @@
|
||||
|
||||
import mitogen.core
|
||||
import mitogen.master
|
||||
|
||||
|
||||
@mitogen.core.takes_router
|
||||
def allocate_an_id(router):
|
||||
return router.allocate_id()
|
||||
@mitogen.core.takes_econtext
|
||||
def allocate_an_id(econtext):
|
||||
mitogen.master.upgrade_router(econtext)
|
||||
return econtext.router.allocate_id()
|
||||
|
||||
|
Loading…
Reference in New Issue