Windows: Implement asynchronous functions as threads.