Quote:
Originally Posted by Lalaland1125
Does anyone know exactly where someone could find the threading guarantees we have with the WPILIB library? Can we set motors from separate threads? Can we call I/O functions(both networking and storage) concurrently? Are the constructors for the PWM-like classes free from contention? Etc.
Some of the newer programmers on my team want to look into multithreading next year and I am wondering whether we need to mutex the world in order for it to work well.
|
I haven't seen it documented anywhere, but I have set motors within Commands, which is WPILib's overly simplified (to a fault I think) system of threading, which I would assume uses the default Thread class. I can't remember for sure whether I have controlled motors in a thread that I created myself, but I am pretty sure that there isn't a problem with it.
I have definitely read files and sockets within a Thread and that works fine.