|
Post by SDL on Aug 12, 2018 12:43:26 GMT -8
Depends what you mean by "thread safe". Yes, so that GWP will run correctly with Threads generated by APScheduler, but no in terms of running all of GroveWeatherPi as a thread.
The version of GWP up there is much better. (3.02). I see from above, that we need to go back and look at what is going on in the situation above. I2C conflict it looks like.
BP
|
|
|
Post by doxidad on Aug 13, 2018 8:56:37 GMT -8
It looks like the I/O isn't thread safe - where I/O = any one of the modules that does I/O or a sensor. If one thread is using the I/O and another tries to do the same thing it get stepped on. Since the thing everyone wants to use is the I/O and there is ONE hardware bus, there should be one entrance into the routines that use it so it can be blocked for use by others until the I/O is complete and released when the current I/O is completed. The bus multiplexer code seems to be a spot that all I/O goes through and might be a good place to do this.
Am I stating this correctly or am I wrong on my assumptions?
TR
|
|
|
Post by SDL on Aug 13, 2018 10:30:55 GMT -8
TR,
Yes, it looks like you are stating it correctly. The problem is the I2C IO is being stepped on somewhere. It's supposed to be semaphore protected and we have hosed up somewhere. It's on our list to readdress this issue.
We will be issuing a new BugWeek Document next week.
BP
|
|
|
Post by doxidad on Aug 13, 2018 12:18:24 GMT -8
Ok Thanks- Appreciate the reply.
|
|