is the lifetime of event objects limited?

[email protected] (( Marc) (A.) (Lehmann ))
Newsgroups perl.loop
Message-ID <[email protected]>
first of all, is this dead, or is everybody on vacation? ;)

anyway, my webserver gets a memory fault about every half an hour (high
load). It runs fine when my callbacks are structured like this:

   sub callback {
      # ... use event structure
      return;
   }

but when my callbacks look like this:

   sub callback {
      push @some_queue, $_[0];
   }

   Event->add_hook(prepare => sub {
      # look at @some_queue, sometimes
      # run one_event or other functions
      # that might recursively call into
      # the event loop.
   });

I get random memory faults. When I keep the same structure but don't
preserve the event objects (push...) then everything seems fine.

Are the event objects being reused in a way that makes it impossible to
extend their life over the callback itself?

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [email protected]      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.