in reply to Re: Non-Blocking Semaphore
in thread Non-Blocking Semaphore

That would do the trick. But only if timing isn't critical as alarm isn't precise (like sleep) and if your timeout is always some number of whole seconds.

/\/\averick

Replies are listed 'Best First'.
RE (tilly) 3: Non-Blocking Semaphore
by tilly (Archbishop) on Aug 26, 2000 at 09:59 UTC
    Time::HiRes offers ualarm if you want and your OS has the command available. You can import their alarm as well.

    Yet another solution on systems which support SysV semantics (Linux does, Windows probably doesn't...) is to use IPC::Semaphore.