In contrast, I don't like some of Python's abstractions, the "subprocess" being (IMO) a particularly weird way to abstract a pipe.
Is it too much to ask to create separate sem_wait()
and sem_post() methods.
What happens when you want to do a sequence of waits and posts, and you want to do it atomically? You'd have to introduce an extra semaphore to control access to all doing your sequence.With the semop() function, you put all your desired operations in one array of ops, and make one semop call, which does all the operations atomically.