in reply to Sending and Catching Signals/Interrupts

Have you lookd at POE? this is the type of proccess that I think would be a very good fit.

-Waswas
  • Comment on Re: Sending and Catching Signals/Interrupts

Replies are listed 'Best First'.
Re: Re: Sending and Catching Signals/Interrupts
by bfish (Novice) on Aug 07, 2003 at 19:10 UTC

    I see what you mean, and I think there might be something here...one problem I've noted is that I can't have two POE sessions running at once, but that is exactly what I need (both the draft program and the trade program).

    I got this impression from the following link poe.perl.org:

    POE's event handlers are cooperative. No two handlers may run at once. Even POE's dispatcher is suspended while an event handler is running. Handlers therefore have an opportunity to monopolize a program. They cooperate by returning as quickly as possible, allowing other parts of the program to run with only minimal delays.
      Look at how POE::Component::Client::HTTP does it, (no the best example, but I am working off the top of my head here before a meeting) it spawns multiple gets at the same time, you can use the same logic.

      -Waswas
        POE::Component::Client::HTTP uses a special "spawn" method to do this. I think it must create a thread or something (I haven't looked at the code). In any case, I don't think I can use it <sigh>.