Hi Tomas,
> 'hear' in the following snippet seems to block the whole process:
>...
>(hear (mailbox I))
It looks like you found a bug in 'hear'!
It works, when you call
(hear (open (mailbox I)))
i.e. when you pass a file descriptor instead of a file name.
I used 'hear' until now on
Hi Tomas,
independent of the discussed problems with 'hear', I would actually not
use 'hear' for this purpose.
If you look in the reference for 'hear', it says "hear is usually only
called explicitly by a top level parent process". The reason is that
upon a 'fork', the 'hear' channel is automatic
On Sun, Feb 01, 2009 at 10:38:01AM +0100, Alexander Burger wrote:
> I think I should change doHear(), to open() with O_NONBLOCK, and then
> immediately call blocking(YES, ex, fd). What do you think?
No, sorry. After some experimentation I notice that this would also not
work properly. 'hear' in co
Hi Tomas,
for "phil.l", I'd suggest another change (besides the call to 'hear').
You tried to use 'rpc' to send messages to the other philosophers. While
this is basically a correct idea, 'rpc' is not suitable in the current
situation. It sends the message via standard output, and is intended to