[Python-Dev] Issue #10348: concurrent.futures doesn't work on BSD (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Wed Dec 29 16:43:11 CET 2010


Hi all, What Victor says above is correct, although I wasn't aware that POSIX IPC under FreeBSD 7.2 was still having problems. Prior to 7.2 it was broken but 7.2 worked OK in my limited testing. In any case, the sysvipc module is mine and it's mature and you're welcome to pillage it in whole or in part.

The question really is whether you would be willing to port Modules/_multiprocessing/semaphore.c to SysV IPC. I realize that this would be practically new code, but it would be much appreciated.

One question is whether it's actually feasible to implement that API with SysV semaphores.

I don't know how we should decide to use POSIX or SysV semaphores. It looks like SysV is preferred on FreeBSD and Darwin (and maybe all BSD based OSes), and POSIX is preferred on Linux. Hmmm, "preferred" is a tricky word here. I would phrase it slightly differently: POSIX IPC is preferred everywhere (by me, at least) because it's a more modern API. However, SysV IPC is fully supported everywhere while the same can't be said about POSIX IPC.

If you can make the above change, the question then is what API multiprocessing semaphores should be built upon. It seems that you are saying that they should use SysV IPC, and only fall back to POSIX IPC if SysV IPC doesn't work/exist (are there any platforms where this would be the case?)

Alternatively, we could have a whitelist of systems on which POSIX IPC is used (==['linux']), and use sysv ipc everywhere else.

Regards, Martin



More information about the Python-Dev mailing list