Polyglot
Polyglot copied to clipboard
Move thread choosing logic to callback closure
Sorry for forgetting this earlier but better late than never!
Here's the follow-up on #16 where we decided to split the PR into two parts as this part seemed to break tests on Travis (tests were still passing on my local machine). Please refer to the commit message in a078ea90ef7fd8a7f7baaed2297241f44a8defaa for the rationale of this change.