I have a requirement which updates the file contents from multiple operation which can occur at the same time.
I need to queue each request and the change the contents of the file for each request one by one.
I am using android broadcast receiver which receives the events for changing the file contents.
How can I queue this events and make changes to file one after the other request.
Please provide some suggestion or if possible please provide any links that I can refer.
I have used executor with single thread. When event is received, we can post runnable to the executor. As the pool has 1 thead, these tasks will run in sequence.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.