Interesting. We implemented something like this the hard way, using exclusive
file opens to implement locks.

Are you sure it doesn't spin while waiting for the lock to free up?

Where can I get the perldoc for this? I'm now using Perl V5.004_04 on OVMS
7.1-1H1.

Thanks.
/Mike





Dan Sugalski <[EMAIL PROTECTED]> on 2000/03/28 16:04:39

To:   [EMAIL PROTECTED]
cc:    (bcc: Mike Marmor/TOR/CA/Reuters)
Subject:  Re: Process Coordination / Synchronisation






At 03:56 PM 3/28/00 -0500, Mike Marmor wrote:


>Is there anything in Perl that implements something like event flags in VMS?
>
>What I'd like to do is wait for a semaphore to become available, and to be
>able
>to do this without spinning/checking.

You can use VMS::Lock to do this if you coordinate things--have the program
being watched aquire the lock, and have the waiting program attempt the
same thing so it'll block until the lock has been released.

If you're on 7.2 you can also try the VMS::ICC module, though that requires
some privs and might not be exactly what you want.

                         Dan

----------------------------------------------------------------------------
Dan Sugalski                          General and VMS-specific perl training
[EMAIL PROTECTED]
                                      Mail me for more details





-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.

Reply via email to