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

Philip Semanchuk philip at semanchuk.com
Wed Dec 29 20:37:29 CET 2010


On Dec 29, 2010, at 10:43 AM, Martin v. Löwis wrote:

>> 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 sysv_ipc 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?)

Actually, I'd probably recommend the opposite. IMO POSIX IPC is better designed and easier to work with so it would be my first choice. SysV would be a fallback for when POSIX IPC is unavailable, broken, incomplete, etc.


bye
Philip


More information about the Python-Dev mailing list