Fix the python part threading changes.

Just getting it to compile
Merge pull request #3 from frbapolkosnik/master

Fix the python part threading changes.