Skip to content

Instantly share code, notes, and snippets.

@saghul
Created May 26, 2011 21:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save saghul/994097 to your computer and use it in GitHub Desktop.
Creating a Twisted ThreadPool
pool = ThreadPool(minthreads=1, maxthreads=1, name='db-ops')
pool.start()
reactor.addSystemEventTrigger('after', 'shutdown', pool.stop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment