On Friday, March 17, 2017 at 11:27:33 AM UTC-4, mwall wrote: > > since python is not really multi-threaded, the separate thread that > monitors the usb transceiver could be dropping the sync (comms with the usb > transceiver and across the rf connection are extremely sensitive to timing). >
> On 17 Mar 2017, at 11:48, Thomas Keffer wrote: > > Python is definitely multi-threaded. It's just not pre-emptively multi-threaded. Because we use multi-threading > pretty exclusively for I/O related things, there are plenty of opportunities (system calls and select statements) > for it to do a context switch. It would be different if we used a thread to go off and do some compute-intensive > calculation --- solve the Sieve of Eratosthenes or something like that. In that case, there would be no opportunity > for a context switch, and other threads would be starved for compute time. > >-tk i mis-wrote. as tom points out, python is multi-threaded, but not pre-emptively multi-threaded. i am guessing that weewx is somehow I/O-bound (indicated by the log messages about report threads), and that starves the ws28xx rfcomm thread so that it is unable to talk to the usb transceiver in a timely fashion in order to establish the sync with the console. m -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
