Skip to content

Commit dee978b

Browse files
authored
Update README.md
1 parent 609ec14 commit dee978b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@ dependencies {
2121
ThreadSwitcher.newChain() // Create an empty chain.
2222
// Concat a UI chain to the empty chain.
2323
.onUI {
24-
// Some tasks to do on UI Thread
24+
// Some tasks to do on a UI Thread
2525
"result" // Pass any value to the next chain.
2626
}
2727
// Concat a Worker chain to the previous chain.
2828
.onWorker { result: String -> // Receive the value from the previous chain.
2929
// Some tasks to do on Worker Thread
3030
}
3131
.onUI {
32-
// Some tasks to do on UI Thread
32+
// Some tasks to do on a UI Thread
3333
}
3434
.onWorker {
35-
// Some tasks to do on Worker Thread
35+
// Some tasks to do on a Worker Thread
3636
"data"
3737
}
3838

39-
// Start to perform all chains from top to bottom.
39+
// Start to perform all chains from the top to bottom.
4040
.start(
4141
// onSuccess callback would be invoked when all chains are finished without any exception.
4242
onSuccess = { result: String -> // The type of parameter is settled by the return value of last chain.
4343
},
4444

45-
// onError callback would be invoked when an exception occurred during the performance of chains.
45+
       // onError callback would be invoked when an exception occurred during performancing chains.
4646
onError = { e: Throwable -> // The exception
4747
})
4848
```

0 commit comments

Comments
 (0)