I recently had a problem with GRC where two threads were accessing
a set_variable callback creating some unwanted behaviour
(actually crashing the xmlrpc server).
I fixed it by editing the python file created by GRC and locking the
set_ callback.
I thought that this can be a separate and interesting feature of the
"variable" block in GRC, ie, a selector that selects if the user wants
it to be "protected".
Then a piece of code like below will be generated:
self.lock = threading.Lock()
def set_variable(self, value):
self.lock.acquire()
self.value = value
other set_ cllabacks
self.lock.release()
best,
Achilleas
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio