I am new to java. My question is what is thread wrapper class for a class. For example I have written an class 'someClass'. Now if I need to break my program in multiple threads, then how to write thread wrapper class for this class. (I know what threads are and how to break a program in multiple threads and run, but I am not understanding meaning of thread wrapper class.) thankx
There is class Thread, which represents a single thread. There an interface Runnable, which can be accepted by a Thread instance for executions.
IMO a good advice is to consult Java Concurrency in Practice book -- the definitive guide to Java concurrency. Really helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With