G
G
Gfd2015-12-19 17:31:15
Java
Gfd, 2015-12-19 17:31:15

How to stop Task?

How to stop this flow?
Task task = new Task(){
@Override
protected Void call() throws Exception {
double TimeStart = 0d;
for (int row = 0; row < 100; row++) {
TimeStart = TimeStart + 0.01;
updateProgress(TimeStart, 1);
try {
Thread.sleep(normalTime);
} catch (InterruptedException e) {
}
}
return null;
}
};

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Danil Antoshkin, 2015-12-19
@TwerTrue

Make the code formatting normal for a start

K
Konstantin Malyarov, 2015-12-19
@Konstantin18ko

Yes, it is desirable to make the code readable, otherwise no one will start solving your question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question