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

7
LINES

< > BotCompany Repo | #1034781 // waitForVarPredicate

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

Libraryless. Click here for Pure Java version (5227L/29K).

1  
static <A> A waitForVarPredicate(Var<A> v, IF0<Bool> pred) ctex {
2  
  synchronized(v) {
3  
    while (!pred!)
4  
      v.wait();
5  
    ret v!;
6  
  }
7  
}

Author comment

Began life as a copy of #1033322

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034781
Snippet name: waitForVarPredicate
Eternal ID of this version: #1034781/1
Text MD5: 461ca9bbc45f2128c72c8be35c86dbef
Transpilation MD5: c41b9f625fe9857b227ce3f7bbb0b469
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-08 09:49:58
Source code size: 148 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 140 / 211
Referenced in: [show references]