Re: Creating active timers within callbacks

2004-01-08 Thread John Christian
Do'h! Ok ... I see my problem. In my IO callback there's a loop around the socket accept, so it's just not returning to the Event::loop, and since most of the functionality is in that IO callback, it was hard to catch earlier. Thanks for bearing with me, John John Christian w

Re: Creating active timers within callbacks

2004-01-07 Thread John Christian
d!!!"); }); $tmp = { who => $p{who}, info => { %p }, jid => $jid, timer => $timer }; # push(@Jobs, $tmp); $JobsByJID{$jid} = $tmp; # at this point, if I call Event::all_watchers, it does return # watchers for timers and the io callback, repo

Creating active timers within callbacks

2004-01-07 Thread John Christian
ted (even with PRIO_HIGH and a hardcoded short interval). Is there anything more I may need to do for the timers to be active? Also, if there is more documentation available in addition to the perldoc, that would be very helpful. Thanks, John

Re: Is it Event.pm or me that's loosing its memory?

2002-05-03 Thread john
I have no idea if this is related, but take a look at bugid 20011218.001 at bugs.perl.org. I got a memory leak in perl5.6.0 just by using a local-ized $_ . Your memory leak may have nothing whatsoever to do with Event. It's fixed in the 5.7 tree, but still broken in 5.6.1. Cheers,

[email protected]

2001-10-18 Thread John Saylor
Hi This is a question I *think* I know the answer to, but I'm not sure. I have an event loop with 3 watchers of the timer flavor. The watchers all point to the same function for their callback. There are variables scoped to the function with 'my'. There is a value that is passed in with the priv

Re: processing a huge array

2001-09-25 Thread John Saylor
Hi > >>>>> "JS" == John Saylor <[EMAIL PROTECTED]> writes: > JS> I want to use Event.pm to increase performance by doing a > JS> parallel-ism thing. > JS> Any suggestions or pointers? If my description is too generic let > JS> me

processing a huge array

2001-09-25 Thread John Saylor
Hi I want to use Event.pm to increase performance by doing a parallel-ism thing. Basically, rather than run through an array member by member, I'll split- er splice the array into smaller arrays and process the smaller arrays all at the same time, each with it's own event handler. Right now I am

gethostbyname and Event

2001-09-09 Thread john
re pre-existing solutions? Thanks, John Salmon

Re: data() problems

2000-04-20 Thread John Salmon
enced major frustration with OO documentation that does not clearly distinguish what's meant for implementors of inherited classes and what's meant for class users (the JDK comes to mind). Please do provide this kind of guidance where it makes sense. Cheers, John Salmon

Re: newbie question?

1999-12-15 Thread John Salmon
Please feel free to copy my script to anywhere that seems useful, e.g., the demo directory, somewhere in the docs, etc. Cheers, John

Re: newbie question?

1999-12-15 Thread John Salmon
me($now), " Next: ", $next, "\n"; Joshua> $w->interval($next); Joshua>}); Joshua>loop(); Bingo! That one works. Thanks. So the bottom line is: you must use the interval attribute and the interval method if the timer is going to be reused. Maybe this observation is worth a line in the pod? Cheers, John Salmon

Re: newbie question?

1999-12-15 Thread John Salmon
constructor was causing me trouble. So I tried the following constructor instead: $w = Event->timer(at => Event::time() + 1); Then I got: [jsalmon@gw]$ ./ev.pl Now: Wed Dec 15 09:06:43 1999 Next: Wed Dec 15 09:06:49 1999 Event: trapped error in '?? ev.pl:5': Repeating timer with no interval at /usr/lib/perl5/site_perl/5.005/i386-linux/Event.pm line 145 Other ideas? Thanks, John Salmon

newbie question?

1999-12-14 Thread John Salmon
hat I'm trying to do: #!/usr/local/bin/perl use Event qw( loop ); $w = Event->timer(after => 1); $w->cb(sub { print scalar localtime, "\n"; $w->after(rand(10.)); $w->again; }); loop(); Can anyone suggest a better approach for this kind of problem? Thanks, John Salmon