in reply to a question on threads

alarm rather than sleep might provide your solution.

Replies are listed 'Best First'.
Re^2: a question on threads
by BrowserUk (Patriarch) on May 11, 2005 at 06:16 UTC

    Do signals work with threads?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
      Possibly not, hence 'might'.
        at least $SIG{__DIE__} works in threads. if you install a hook for it, for instance a logger, like:
        $sig{__DIE__} = sub { add_log(shift) };
        (with add_log being the sub that prints out messages to a logfile), this hook will be recognized even from within a thread. you then get the original error message plus a "thread was unable to start".

        language is a virus from outer space.
      Not unless you feel like having your signal sent to every thread of your process.

        Exactly.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
        "Science is about questioning the status quo. Questioning authority".
        The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.