On 27.03.2009, at 02:45, Christian Convey wrote:

> In FLTK 1.1.7, the API documentation has left me a little confused.
>
> It says that Fl::awake() will enqueue a message that can be read  
> from Fl::thread_message().
>
> But then the documentation says: "The default message handler saves  
> the last message which can be accessed using the  
> Fl::thread_message() function."
>
> That makes it sound like I can only access the message that was most- 
> recently enqueued using Fl::awake(), and that messages enqueued  
> earlier but not yet read are rendered inaccessible.  E.g., the  
> documentation makes it sound like awake()/thread_message() are used  
> to access a mailbox, not a queue.
>
> How is one supposed to actually use awake()/thread_message() as a  
> queue data structure rather than as a mailbox?

    Fl::awake(void*) - Causes Fl::wait() to return (with the lock
    locked) even if there are no events ready.

    Fl::thread_message() - returns an argument sent to an
    Fl::awake() call, or returns NULL if none.  WARNING: the
    current implementation only has a one-entry queue and only
    returns the most recent value!

But 1.1.7 is really out of date. I suggest that you use 1.1.10 or 1.3  
because it has some new functionality:

    Fl::awake(void (*cb)(void *), void*) - Call a function
    in the main thread from within another thread of execution.


----
http://robowerk.com/


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

Reply via email to