Fix #16 Improve thread related methods
Merge pull request #25 from splavs/dev

Fix #16 Improve thread related methods