Closed kameyer226 closed 1 year ago
@kameyer226 It seems like you are trying to grok how the event loop works in asyncio. Async programming is a popular and robust way to achieve concurrency without risking collisions like you would with traditional multithread or multiprocess approaches. The really powerful feature of the async programming style is that we control exactly which blocks of code run synchronously and when we allow other tasks to run. The await syntax tells asyncio that we are willing to run other tasks if they are available. Consider referring to asyncio documentation and working through examples to understand these concepts---concurrency is complex so you might need to set aside some time.
Is there a particular measurement-related problem you are facing?
seeing and trying to remove update_state and/or save_state when it shouldn't be
This might indicate that you've had a problem. Could you say more? Are you experiencing a specific problem within a specific daemon?
Any context would be appreciated.
Yes, it is a popular way to run concurrent operations. I completed programming one of these. It can be quite complex!
Great, glad to hear it.
_has_measure_trigger.py: 33
Doesn't this mean that the runner has to be in a separate loop from the main daemon loop? Otherwise it could be seeing and trying to remove update_state and/or save_state when it shouldn't be.