I want to implement a class that will manage the threads in my library.
The bottom line is that I need to create methods in other classes that run in parallel.
Suppose I want to implement a method that processes a list in several threads and returns a map.
For this, in the method I am going to create an object of the class threads_manager and transfer to it the data processing function and additional information (number of threads, etc.).
Next, in the constructor, create n class objects, on the next Thread and then start them.
Question: Do I reason correctly and how can I transfer the method to the constructor so that I can transfer it to another constructor?
I apologize in advance, I'm new to java and C ++ is still sitting tight in my head.