What's the best way to duplicate fork() in windows?

RyanBrady picture RyanBrady · Aug 22, 2008 · Viewed 29.7k times · Source

How do I implement some logic that will allow me to reproduce on Windows the functionality that I have on Linux with the fork() system call, using Python?

I'm specifically trying to execute a method on the SAPI Com component, while continuing the other logic in the main thread without blocking or waiting.

Answer

kanaka picture kanaka · May 16, 2011

Use the python multiprocessing module which will work everywhere.

Here is a IBM developerWords article that shows how to convert from os.fork() to the multiprocessing module.