Hi all,
Some general questions re. the dispatcher and callbacks:
- The callbacks are happening in a (non-main) thread. Is this the primary/only python-openzwave thread such that I can expect all the data structures to be static while I'm in the callback? I.e., is there any chance a Node will change while I'm in the middle of querying its attributes?
- Will anything break if I spend too much time in a callback?
- Relatedly, is there any way to lock the data structures from my main thread, such that I can query the network and node states and be assured they won't update in the middle of my query?
- Or most generally: What's the "right" way to approach this -- is there some common way to handle these issues that skirts any problems?
Lastly,
- I note the dispatcher is a global variable by default -- is it possible to pass it as a parameter when creating the Network to avoid collisions with other libraries that might also use pydispatch? (Looking at the source code, it would seem not, but perhaps there's some trick to it?) If not, is it just assumed that there will be no (unintentional) signal name collisions between libraries?
Thanks for any tips,
-Brandyn