On Tue, Mar 21, 2000 at 11:51:38AM -0000, Paul Moore wrote:
> Actually, this approach looks a bit more complicated than that (but it also
> looks like the way it needs to go -- see below). I need to be able to wait
> on *any* Win32 "synchronisation object" - not just files. So I need a way to
> pass a Win32 HANDLE which may not be related to a file at all.
> 
> The Perl API is the main point here - how about
> 
>     Event->io(fd => \*STDIN, cb => \&callback);
> 
> as now, with the alternative for non-file handles of
> 
>     Event->io(handle => $WIN32_HANDLE, cb => \&callback);

Event->io should not be associated directly with what eventually gets
passed to multiplex. Sure on unix this will only be IO obejct but on
other systems they can be others. If you have other object which can be
waited on then they should IMO have thier own watchers, which tell the
internals that something needs to be added to the multiplex

> The other side of the issue that I see is that Event revolves fundamentally
> around IO-ish watchers, like it or not. This is because (correct me if this
> is all wrong...) the event loop waits in pe_multiplex (which is basically
> implemented as pe_sys_multiplex). But pe_sys_multiplex is implemented in
> unix_io.c. So I'd need a win32_io.c, even though all of this is not really
> IO related...

IMO, those files are mis-named. They should just be unix.c and win32.c. As
you point out it is not only IO that differs.

Graham.

Reply via email to