Is there a threading library for B4J that could launch a thread for each class instance?
I am trying to write a program that initializes a class array, but it would be ideal if i could initialize each Class as its own thread that way connections/etc can happen in parallel without one class having an issue or slowdown hanging up all the other classes on the main thread. Each class is a connection out to an MQTT server as well as handling data to/fro that server on a specific subtopic set during the initialization of that class. There could be 10 instances of that class or more running listening/performing operations on specific subtopics/topics in parallel.
Only other way i can think of is launch multiple instances of the jar versus one jar with multiple threads.
Any ideas? thanks.
I am trying to write a program that initializes a class array, but it would be ideal if i could initialize each Class as its own thread that way connections/etc can happen in parallel without one class having an issue or slowdown hanging up all the other classes on the main thread. Each class is a connection out to an MQTT server as well as handling data to/fro that server on a specific subtopic set during the initialization of that class. There could be 10 instances of that class or more running listening/performing operations on specific subtopics/topics in parallel.
Only other way i can think of is launch multiple instances of the jar versus one jar with multiple threads.
Any ideas? thanks.