Created
June 2, 2018 21:41
-
-
Save yccheok/b165c483788b09830b3b28148ab7d4c0 to your computer and use it in GitHub Desktop.
SyncWorker
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 SyncWorker extends Worker { | |
private static final Object object = new Object(); | |
@NonNull | |
@Override | |
public WorkerResult doWork() { | |
synchronized (object) { | |
return _doWork(); | |
} | |
} | |
@NonNull | |
public WorkerResult _doWork() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment