Do some platform-dependent threading stuff (not working)