[Python-ideas] @run_as_thread decorator
Giampaolo RodolĂ
g.rodola at gmail.com
Sat Mar 5 14:21:32 CET 2011
More information about the Python-ideas mailing list
Sat Mar 5 14:21:32 CET 2011
- Previous message: [Python-ideas] names as objects [was: The Descriptor Protocol...]
- Next message: [Python-ideas] @run_as_thread decorator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>> import time, threading >>> >>> @threading.run_as_thread ... def foo(): ... time.sleep(100) ... return 1 ... >>> t = foo() >>> t.isAlive() True >>> t.join() >>> t.isAlive() False >>> The same thing could be done for multiprocessing module. Would this be acceptable for inclusion? --- Giampaolo http://code.google.com/p/pyftpdlib/ http://code.google.com/p/psutil/
- Previous message: [Python-ideas] names as objects [was: The Descriptor Protocol...]
- Next message: [Python-ideas] @run_as_thread decorator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list