Re: Event and max_cb_tm,
[email protected] (Joshua N Pritikin) Tue, 01 Feb 2005 18:51:16 +0530
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 2005-02-01 at 13:17 +0100, Dariush Pietrzak wrote:
> Is my memory failing me, have Event ever had this property of time-outing
> long running callbacks?
Not by default.
> I found max_cb_tm in docs, but it doesent work:
> Event->timer(interval=>5,max_cb_tm=>1,cb=>sub {sleep 999999;},);
> and grep max_cb_tm Event.pm reveals nothing.
Hrm, did you try Event::Stats? Just read the doc:
=item max_cb_tm => $seconds
The maximum number of seconds to spend in a callback. If a callback
uses more time then it is aborted. Defaults to 1 sec. This feature
is normally disabled. See Event::Stats.
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBB/4JMqcqnlKSmC70RAuSPAJ96N01hVaZlZmY2Z7CkYreqrXgm1QCaAlqc UZNUmAJh2xvvMPXUDsdy9h4= =d/BE -----END PGP SIGNATURE-----