There is a std::list<std::thread>
in a class with another thread which can add some. How to handle the responsibility to remove a thread element from the list when it’s finished ?
I thought about another thread which can be notified by a finishing thread to do so, but it appears to become complicated to me and I am not sure if I’m missing something and the whole thing may just be a bad idea.
New contributor
coucou is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.