Re: External event loop for glib?



> I'm not sure if you are talking about actual OS threads or not.
It's OS threads. Basically, pike is probably simply more debugged. :-)
It has had a threaded main event loop for a few years now.

Pike uses two sets of pollfds, they are swapped just before poll. Then
when poll is done, we check if the fd is still in the other fd-set
before calling any callbacks.

> Simulating this stuff on systems without a native poll()
> seems rather difficult. Does pike do it?

Yes, actually it does (more or less, the close/read callback
differentiation stuff is handled by the default read callback, and the
RDBAND and WRBAND is handled through the exception FDs when using
select, outgoing exception data callback is somewhat advanced without
poll, though, it's handled by checking the normal write set, this
works with all unixes we have found so far).

On NT we don't have OOB at all yet.

-- 
Per Hedbor                                              http://per.hedbor.org/



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