3 ms·
> That runs into a problem on a quick reply. Read the second sentence; process A does the write+select on AB and [BA,...], yields to B, is not ready to run; B
by a1369209993 7y ago
> That runs into a problem on a quick reply.
Read the second sentence; process A does the write+select on AB and [BA,...], yields to B, is not ready to run; B generates a reply and writes it to BA, which has a read (technically select) already pending.
- Animats 7y agoThat's the advantage of a combined read and write. But if you're going to have that, it's more convenient to explicitly package it as a request/reply. Less trouble with things like having two messages in the pipe and such.
- a1369209993 7y agoYou might be waiting (via select) for multiple replies; you don't know whether B will (say) grab something out of disk cache and chuck it back to you, or if it'll fire off a seek command to the spinning rust and take a nap just as your network round-trip completes. Having two (or more) messages in (separate) pipes is the point of using select.