Re: [Jack-Devel] Graph callback and client state

PrevNext  Index
DateTue, 09 Apr 2013 21:27:28 +0100
From Harry van Haaren <[hidden] at gmail dot com>
ToPaul Davis <[hidden] at linuxaudiosystems dot com>
Ccjack-devel <[hidden] at lists dot jackaudio dot org>
In-Reply-ToPaul Davis Re: [Jack-Devel] Graph callback and client state
Follow-UpPaul Davis Re: [Jack-Devel] Graph callback and client state
On Tue, Apr 9, 2013 at 8:51 PM, Paul Davis <[hidden]>
wrote:
> there is always a race ... sometime between when you get the ports and
when you use the information, ports could be added, removed or become
inactive.

Perhaps I'm really barking up the wrong tree, but I'm learning in the
process here..

Add the flag as described previously to JackPortFlags,
Every time a port has its "active" flag toggled, trigger the existing
GraphOrderCallback.
I think this is what makes most patchbays update / redraw, hence state will
be up to date.

That would avoid the race between a client marking active (and hence its
ports becoming active),
and the jack_port_flags() call.. since the callback updates state, and the
patchbay client won't have to poll?

Perhaps I'm understanding the race wrong?
PrevNext  Index

1365539255.15838_0.ltw:2,a <CAKudYbMQUKFXpJht5t=PL-AByrcTnO8-1SQwiaxh1R4pbuDJFw at mail dot gmail dot com>