expose threading functions
Merge pull request #111 from tvh/threading

expose threading functions (fix for #110)