chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Event Scheduling?


From: Hans Bulfone
Subject: Re: [Chicken-users] Event Scheduling?
Date: Fri, 4 Jan 2008 02:35:33 +0100
User-agent: Mutt/1.5.16 (2007-06-09)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]