Multithreading support
Merge pull request #1 from vadim-kovalyov/threading

Multithreading support