Created
December 11, 2019 11:14
-
-
Save wangerekaharun/d150812acd35325f0ec43537ff7d9aa4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PreviousRideRepo { | |
| // define a new executor of type single thread | |
| private Executor executor= Executors.newSingleThreadExecutor(); | |
| private void insert(){ | |
| executor.execute(()->{ | |
| // do your insert here inside this block | |
| requestsDao.savePreviousRequests(requestList); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment