Closed arnobaer closed 4 years ago
An optimized approach for custom process/thread callback registration and calls.
class Process(comet.Process): def run(self): while self.running: self.push("temp", 22.5) self.push("humid", 50.0) self.push("status", 42) process = Process( fail=ctrl.handle_error, # built in callback temp=ctrl.handle_temp, humid=ctrl.handle_humid ) process.callbacks["status"] = ctrl.handle_status ...
Optional move built in callbacks begin, finish and fail also to property callbacks to avoid accidental assignment in process run().
begin
finish
fail
callbacks
run()
An optimized approach for custom process/thread callback registration and calls.
Optional move built in callbacks
begin
,finish
andfail
also to propertycallbacks
to avoid accidental assignment in processrun()
.