James Mansion wrote:
Gordon Sim wrote:
Alan Conway wrote:
    // Pull style:
    LocalQueue lq;
    queue.subscribe(lq);
    while (...) { Message m = lq.get(); ... }

    // Push style
    MyListener l;
    queue.subscribe(l);
    sessoin.run();
}

How does any of this integrate into a single-threaded application's main loop?

At present (in both the current and proposed apis) if dispatch to registered listeners is used then a thread needs to be dedicated to that (it can be the main thread, e.g. as in the various listener examples). Using the 'pull' style interface offers a little more flexibility.

I agree the supported threading models is an area that needs more thought (e.g perhaps offer something like a dispatch(n) call that does only a limited amount of work, as discussed on another thread by Alan and Rick).

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to