Yep, that's right. It should come before the end of method 'run'.
I've added a detach() method to the class skeleton, and I've also wrapped the OS X version of getProcessorCount() and it seems to work. It's actually not counting the CPUs, but the cores, by the way. When you're on Windows, getProcessorCount() should perform the code provided above by BlitzSupport.
Somebody still needs to do the Linux version.
I've put everything that I have so far into a module. It can be downloaded from here.
I've added a detach() method to the class skeleton, and I've also wrapped the OS X version of getProcessorCount() and it seems to work. It's actually not counting the CPUs, but the cores, by the way. When you're on Windows, getProcessorCount() should perform the code provided above by BlitzSupport.
Somebody still needs to do the Linux version.
I've put everything that I have so far into a module. It can be downloaded from here.