Merge pull request #111 from tvh/threading

expose threading functions (fix for #110)
warning fix