Coincident value changes and task triggers
Posted: Mon Dec 01, 2008 11:51 am
I have a situation where a plugin is updating several properties associated with a device all at the same time - the source is actually a single Ethernet packet (xAP) that groups values for several associated properties . Think of this as say Artist, Album, Track and Genre that all change at once but obviously are really updated within HB sequentially. What I think is happening is that the HB task associated with a property value change (or same value update) is being triggered before the other associated property value updates have actually happened... and so within the task when I check other parameter values they may not be current. Based on how HB handles task triggering this does this sound likely ?
Obviously this behaviour is correct technically so my next question is how can I work around this . Could I delay a fraction of a second within the task to allow for the other values to update - which will be near instantly ? I'm thinking a delay may not allow these updates to happen due to the way HB handles such things - and there's a potential problem that other parameter updates might trigger other tasks... Unfortunately the order of the parameter value updates isn't predictable with Artist sometimes changing when Album stays fixed or vv , and some values don't change at all. So I really want a mechanism to know that a complete set of related parameter values have all updated and are valid. I guess the plugin could maintain a 'complete' parameter that it always updated last that I could trigger off but is there another way ?
K
Obviously this behaviour is correct technically so my next question is how can I work around this . Could I delay a fraction of a second within the task to allow for the other values to update - which will be near instantly ? I'm thinking a delay may not allow these updates to happen due to the way HB handles such things - and there's a potential problem that other parameter updates might trigger other tasks... Unfortunately the order of the parameter value updates isn't predictable with Artist sometimes changing when Album stays fixed or vv , and some values don't change at all. So I really want a mechanism to know that a complete set of related parameter values have all updated and are valid. I guess the plugin could maintain a 'complete' parameter that it always updated last that I could trigger off but is there another way ?
K