hi,

On Thu, Jan 03, 2008 at 03:16:49PM -0600, Ozzi wrote:
> I'm looking to write a daemon that will periodically poll a HTTP server. Is 
> there an event scheduling egg out there somewhere? If not, does anyone have 
> an opinion on how best to implement such a thing?
>
> I've considered using set-alarm! or thread-sleep!, or perhaps porting TIMER 
> (http://www.xach.com/lisp/timer/doc.html)
>
> Thoughts?

i'd rather use thread-sleep! (perhaps in a dedicated thread) than set-alarm!.
personally i use alarm signals only for implementing timeouts in simple
single-threaded applications that don't have a select() loop (which chicken
has inside its thread scheduler).

signals are imho often somewhat problematic to deal with, especially when
you want to use them for repeated background tasks when foreign libraries
are involved that may not properly restart interrupted system calls.

hth&bye,
hans.


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to