Hi I am designing a 6A current source. I know how to design a current source I am just looking for suggested materials that can handle the full 6A. The op amps and transistors that I have now are more on the milliamp side so I just am looking for something beefier.


Question: which is the best way to access a shared object in a multithreading application?
Answer: The right question to ask is why you use a different thread for the save. If it is because threads are nice just forget about it and do the save in main thread. If it is because your app is already multithreaded, you will have to protect accesses to the vector with mutexes to ensure that you read coherent values.

If your data is not too large and the save does not freeze the whole application, just hold the mutex all the time for the save. If this is not acceptable (for performance or User Interface reasons), only hold the mutex while copying the vector in memory to a different location, release the mutex and write asynchronously to disk.