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

21
LINES

< > BotCompany Repo | #1006056 // withDBLock - execute code while holding DB lock

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (12871L/87K).

static O withDBLock(O r) {
  lock db_mainConcepts().lock;
  ret callF(r);
}

static <A> A withDBLock(F0<A> r) {
  ret (A) withDBLock((O) r);
}

static O withDBLock(Concepts concepts, O r) {
  lock concepts.lock;
  ret callF(r);
}

static <A> A withDBLock(Concepts concepts, F0<A> r) {
  ret (A) withDBLock(concepts, (O) r);
}

static <A> A withDBLock(Concept concept, IF0<A> r) {
  ret (A) withDBLock(concept._concepts, r);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006056
Snippet name: withDBLock - execute code while holding DB lock
Eternal ID of this version: #1006056/6
Text MD5: 1ca90b9faf1f7e20062d0b115926603b
Transpilation MD5: 211198b4a19df2112d297465db43187a
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-14 20:43:23
Source code size: 445 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 606 / 675
Version history: 5 change(s)
Referenced in: [show references]