Answer the question
In order to leave comments, you need to log in
How to run a function in a separate thread?
Hello. Can you please tell me if it is possible to run functions funkA, funkB, funkC in different threads?
public class SmartAlgorithm implements Runnable {
public static void main(String[] args) {
}
public void run() {
}
public void run(int c) {
}
public void funkA(int a) {
}
public void funkB() {
}
public void funkC() {
}
}
Answer the question
In order to leave comments, you need to log in
You can use the Fork/Join Framework. There is RecursiveAction and RecursiveTask. Read more here: https://habrahabr.ru/post/128985/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question