Open niccokunzmann opened 8 years ago
Some actions may last for a while. They should not block the UI.
Solution Create a LongTask class. This class has the following properties:
LongTask
task()
complete()
start()
cancel()
Some actions may last for a while. They should not block the UI.
Solution
Create a
LongTask
class. This class has the following properties:task()
which is called in a separate thread and should have no side effectscomplete()
which is called in the main thread and has side-effectsstart()
cancel()
to cancel the task = thecomplete()
function is not executed whentask()
ended,LongTask