I call 20 Threads and they are opened at certain intervals between them. I want 5 threads to be closed at the same time after all of them are opened. How can I do that?
There are many solutions to do this, but which solution helps to optimize the source code is important. Please clarify the purpose, explain more clearly