Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1012797 // releaseDBLockOnTimeoutEval

JavaX fragment (include)

static void releaseDBLockOnTimeoutEval() {
  callOptMC("beforeDelegatingToThread_do", f releaseDBLockOnTimeoutEval_before);
  callOptMC("afterDelegatingToThread_do", f releaseDBLockOnTimeoutEval_after);
}

static new ThreadLocal<Bool> releaseDBLockOnTimeoutEval_hadLock;

svoid releaseDBLockOnTimeoutEval_before(Thread t) {
  releaseDBLockOnTimeoutEval_hadLock.set(unlockIfHolding(dbLock()));
}

svoid releaseDBLockOnTimeoutEval_after(Thread t) {
  if (isTrue(getAndClearThreadLocal(releaseDBLockOnTimeoutEval_hadLock)))
    lock(dbLock());
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1012797
Snippet name: releaseDBLockOnTimeoutEval
Eternal ID of this version: #1012797/1
Text MD5: 6b8e33c188be0dea7f2ed37f1c8efb98
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-13 16:43:43
Source code size: 556 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 363 / 393
Referenced in: [show references]