[Ovmsdev] Improve shutdown of poller
frog at bunyip.wheelycreek.net
frog at bunyip.wheelycreek.net
Sun May 26 20:28:44 HKT 2024
I've had some hang-ups on shutdown and have been through a few iterations on
working out what is happening.
I then realised there was the whole MyBoot.ShutdownPending thing which
would be the proper way to do waiting for shut-down.
I'm mostly read to submit for that. but one small thing was that I have been
conditionally creating the poller thread and queue and that has potential
race-condition problems. I can definitely solve that using the poller crit
section and some atomic operations.
However, I'm thinking that maybe I should create the poller Task and poller
queue unconditionally in the constructor? Any objections? It would
certainly remove the whole race condition. I had the best intentions of
making it conditional.. but now the act of creating any Vehicle class starts
the poller, it seems a bit pointless.
//.ichael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20240526/f9aff2ed/attachment.htm>
More information about the OvmsDev
mailing list