Handling threading better with @sync
Merge pull request #5 from jules2689/better-threading

Handling threading better with @sync