W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1996

Re: function call when event loop is idle?

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Wed, 01 May 1996 15:19:43 -0400
Message-Id: <9605011919.AA03531@www18.w3.org>
To: Paul Law <paul-law@ix.netcom.com>
Cc: www-lib@w3.org
Paul Law writes:

> Does anyone know of a simple way to destinate a function (implemented 
> by the client application) to be called when the event loop is idle? 
> For example, the client might want to do some housekeeping tasks 
> and/or fetch some documents from the net (not initiated by the user 
> or the result of previous fetches) when the event loop has no 
> outstanding user event or active socket.

On Unix, you can register a timeout callback function to be called when 
select() times out. You can register the function to be called always - that 
is - both when loads are going on and when the Library is idle, or you can 
register it only to be called when the Library is waiting for a request. 
Unfortunately you can only register one timeout function as select() doesn't 
support more than this.

On Windows, it uses SetTimer() and I am not sure about if the functionality 
matches - Eric?

> In case it does matter, I work on Windows NT platform.

It shouldn't but who knows ;-?


Henrik Frystyk Nielsen, <frystyk@w3.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA
Received on Wednesday, 1 May 1996 15:19:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:47 UTC