|
From: David R. <da...@dr...> - 2010-02-26 06:37:16
|
On Wed, 2010-02-24 at 17:49 -0500, Stephen Sinclair wrote: > On Fri, Feb 19, 2010 at 4:55 PM, David Robillard <da...@dr...> wrote: > > On Thu, 2010-02-18 at 13:21 -0500, Stephen Sinclair wrote: > >> On Tue, Feb 16, 2010 at 6:41 PM, David Robillard <da...@dr...> wrote: > >> > P.S. It would be also possible for apps that use lo_server_recv and > >> > friends directly to know about bundles if it only dispatched one message > >> > at a time and lo_server_events_pending worked as advertised, but the > >> > callback is more useful and generic anyway > >> > >> By the way, I don't actually this is an appropriate use of > >> events_pending(), but in what way is it broken? > > > > I was expecting each individual message of a bundle to be dispatched > > independently, thus events_pending() could be used to check if you're in > > a bundle. Unfortunately the entire bundle is dispatched at once so this > > is not the case. > > > > A proper callback is better anyway, so whatever > > Right. Technically they aren't "pending" until liblo sees them, and > since it goes through the bundle one at a time, it hasn't seen the > rest of the messages in the bundle yet so they aren't yet pending.. > > I wonder if this should be changed/fixed? > > Perhaps not, because I think events_pending() should be used mostly to > check if there are _future_ messages, not more _now_ messages. It's probably best to leave it as-is, it's not the right way to check for more _now_ messages anyway. Attached is a revised bundle handlers patch which uses separate callbacks and passes the timetag to the start handler. Cheers, -dr |