Forgive my ignorance on this matter but I want to be sure I start out this project on the right foot.
-If I have multiple devices on an I2C bus (or SPI) and I want to access each those devices with different threads do I need to lock access to the i2c bus? Since TinyCLR is single-threaded, and I assume Read/Write functions block until completion is it necessary?
-Similar question as above but in regards to a memory buffer. I will have a large memory buffer, probably 4KB that will need to be shared by multiple threads. Various threads will be reading/writing data to it, does it need locking.
I guess the bigger question is does a thread always run to completion or Thread.Sleep() with no interrupts? (I guess that’s 3 questions.)
To clarify my 3rd question, or put it a different way. Is there anything that would interrupt a thread mid-process? So if I have a thread reading through an array of 100 elements are there any processes or tasks that would interrupt that before it’s done?