Yep ... sure miss sem$wait & sem$notify.  You could accomplish the same
thing with a simple socket-based protocol.  The main process could listen on
a socket and wait for any of the sub-processes to connect and send a message
via the socket.  

Larry Hiscock
Western Computer Services


-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Tom Whitmore
Sent: Thursday, February 26, 2009 12:25 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Inter-Process Control...

I agree.  I wrote two little programs.

LOCK.TEST1
0001 LOCK 60 ELSE CRT '60 LOCKED'
0002 CRT 'UNLOCKED'


LOCK.TEST2
0001 UNLOCK 60
0002 CRT '60 WAS UNLOCKED'

LOCK.TEST1 locked 60 displayed "unlocked".
LOCK.TEST2 generated the error ' Program "LOCK.TEST2": Line 1, Lock 60 not
owned by calling process' and then displayed "60 WAS UNLOCKED".

As I was playing with the test programs as I type this.  it looks like the
first process needs to perform the first lock.  The second process will then
lock, and wait on the lock until the first process unlocks.  I need to be
able to support many-to-one processes.  The "one" process waits on the lock
and any of the "many" processes need to release the lock... which the old
semaphore process supported... I confess, I'm spoiled.  :)

Thanks
Tom
-----Original Message-----
From: owner-u2-us...@listserver.u2ug.org
[mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Thursday, February 26, 2009 2:01 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Inter-Process Control...

Tom, can you elaborate when you say "the only process that can modify the
lock is the one that set it".  Isn't that exactly how a semaphore is
supposed to work?  Both processes should be able to set the lock but only
one can have it at any moment in time. Or am I missing the point?
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to