You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the python implementation, the RecordAggregator class is annotated as "not thread-safe", however the class makes use of threading to execute the callback by default.
Won't this snippet end up clearing the record before executing the callback?
# If we hit this point, aggregated record is full# Call all the callbacks (potentially on a separate thread)out_record=self.current_recordfor (callback, execute_on_new_thread) inself.callbacks:
ifexecute_on_new_thread:
threading.Thread(target=callback, args=(out_record,)).start()
else:
callback(out_record)
# Current record is full so clear it out, make a new empty one and add the user recordself.clear_record()
A simple workaround is stop using threading for callbacks.
The text was updated successfully, but these errors were encountered:
I think actually that line 215 should instead use copy.deepcopy() rather than assignment. But in principle I agree that this is an issue. Will look to patch.
In the python implementation, the
RecordAggregator
class is annotated as "not thread-safe", however the class makes use ofthreading
to execute the callback by default.Won't this snippet end up clearing the record before executing the callback?
A simple workaround is stop using
threading
for callbacks.The text was updated successfully, but these errors were encountered: