> why does the add_timeout work even when i move windows 
> around and the add_fd methos blocks?

I don't know - I would expect it to block/not-block in the same was as
fd_add et al, so I;m not sure why it does not....

> do you have any other ideas on how i could get a 
> nonblocking fd_add cb on the mac to "signal" my main 
> thread?

Not so far...

> since, on windows, pipes are not supported would you 
> recommend to use add_handler and call
> SendMessage(ui, some_unrecognized_event, 0, 0) from the 
> worker?

Pipes are supported on win32 systems, just not in the same way... I have
an app that uses named pipes like this:

        pipe_stat = mkfifo(pipe_name, 0666); // etc...

For *nix and OSX, and on win32 I use:

    pipe_fd = CreateNamedPipe(pipe_name,
                                PIPE_ACCESS_DUPLEX,
                                PIPE_TYPE_BYTE | PIPE_READMODE_BYTE |
PIPE_WAIT, // | PIPE_NOWAIT,
                                1, //2,
                                0,
                                buf_sz,
                                INFINITE,
                                NULL);

To get a similar effect. Actually reading from the win32 pipes then uses

   ReadFile(pipe_fd, buf, nbytes, &amount, NULL);

Rather than
        read(pipe_fd, buf, nbytes);

And so on... But it does work.

> i'd really like to let the reader idle on all three 
> platforms. currently i only got it working lockfree in 
> linux.

Even on linux I've had some odd things - I suspect (but never bothered
to prove) that this might be related to which WM I am using at any given
time, it seems as if some block, some do not. 
It's tricky. I have no useful answer I'm afraid.

-- 
Ian


SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to