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

11
LINES

< > BotCompany Repo | #1029509 // tempVerboseLock

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

Transpiled version (2546L) is out of date.

static AutoCloseable tempVerboseLock(S purpose default "", Lock lock) {
  if (lock == null) null;
  S desc = dropPrefix("java.util.concurrent.locks.", str(lock)) + appendIfNempty2(" for ", purpose);
  print("Locking " + desc + " in " + currentThread());
  lock(lock);
  print_noFail("Locked " + desc + " in " + currentThread());
  ret () -> {
    print_noFail("Unlocking " + desc + " in " + currentThread());
    unlock(lock);
  };
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029509
Snippet name: tempVerboseLock
Eternal ID of this version: #1029509/6
Text MD5: b7ed89d2f52d73c34c85da3dae455825
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-08-16 20:01:17
Source code size: 443 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 195 / 295
Version history: 5 change(s)
Referenced in: [show references]