Forum Archive

Multiprocessing?

Cagatay

Any info why multiprocessing library does not exist?

dgelessus

Apple does not allow apps to create child processes, and calling os.fork() raises an OSError [Errno 2]: Permission denied. multiprocessing relies on subprocesses as far as I can tell, which is probably why it wasn't included. The threading module is still usable (I think) so you might want to try using that instead.

omz

iOS apps cannot spawn subprocesses (Apple policy), so it's not possible to support this module.

Cagatay

Thanks for the info, not only the threading but also want to test the multiprocessing.Pool on Pythonista

ijkim88

I noticed that Pythonista 3 beta has the multiprocessing module. Does that mean it's okay now and can be ported to 2? Or will it be removed once out of beta?

JonB

I believe mostly this gives operation not permitted.

omz

@ijkim88 @JonB is right, it pretty much doesn't work. I've left it in there for the same reason as subprocessing – some third-party modules may rely on it being importable (because it's in the standard library), but still have functionality without it.

ijkim88

@JonB @omz Gotcha, thanks!!