Created
May 3, 2013 22:54
-
-
Save andresriancho/5514900 to your computer and use it in GitHub Desktop.
Huerfanitos!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import threading | |
from multiprocessing.pool import ThreadPool | |
def wait(): | |
time.sleep(5) | |
class A(object): | |
def __init__(self): | |
self.p = ThreadPool(10) | |
a = A() | |
a.p.apply_async(wait) | |
#a.p.close() | |
#a.p.join() | |
del a | |
print threading.enumerate() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment