It seems right now `wait()` is implemented only for Linux. Is there a fundamental problem? Any workarounds to make the code work on any platform?