Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Thread t;
- public StackRecordDbModel popScreen() {
- Timber.d("popScreen: before take from cache");
- if (t != null && t.isAlive()) {
- try {
- Timber.d("popScreen: need join");
- t.join();
- } catch (InterruptedException e) {
- Timber.e(e, e.getMessage());
- }
- }
- StackRecordDbModel lastRecordCache = stackCache.remove(stackCache.size() - 1);
- Timber.d("popScreen: got cache record=%s", lastRecordCache.screenId());
- t = new Thread(() -> {
- StackRecordDbModel lastRecordDb = stackLocalRepository.getRecord(
- new StackLocalRepository.SelectionLastRecord(claimId, testId));
- stackLocalRepository.removeRecord(lastRecordDb);
- Timber.d("popScreen: removed from DB record=%s", lastRecordDb.screenId());
- });
- t.start();
- return lastRecordCache;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement