You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
@@ -50,7 +50,105 @@ public class MyAsyncTask extends AsyncTask<String, IOException> {
50
50
protectedvoidonException(finalIOExceptione) {
51
51
// Handle IOException
52
52
}
53
+
}
54
+
```
55
+
56
+
## Executing
57
+
58
+
Like Android's `AsyncTask`, you can call `execute()` on the `AsyncTask` instance to start it:
59
+
60
+
```java
61
+
newMyAsyncTask().execute();
62
+
```
63
+
64
+
Alternatively, you can use an [`AsyncTaskExecutor`](https://github.com/Label305/AsyncTask-Android/blob/master/asynctask/src/main/java/com/label305/asynctask/AsyncTaskExecutor.java)
65
+
to delegate the execution. A default implementation is available as `AsyncTaskExecutor.DEFAULT_EXECUTOR`, which is used by `AsyncTask.execute()`.
The `AsyncTaskExecutor` can come in handy while testing. When practicing dependency injection, you can inject a different implementation that executes the
0 commit comments