Libraryless. Click here for Pure Java version (438L/3K/12K).
!7 p { assertFalse(Thread.holdsLock(mc())); synchronized(mc()) { assertTrue(Thread.holdsLock(mc())); } assertFalse(Thread.holdsLock(mc())); new O o; assertFalse(Thread.holdsLock(o)); synchronized(o) { assertTrue(Thread.holdsLock(o)); } assertFalse(Thread.holdsLock(o)); print("OK"); }
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: | #1008789 |
Snippet name: | Test Thread.holdsLock [WORKS] |
Eternal ID of this version: | #1008789/2 |
Text MD5: | c4e57f128ccb54f548b93432a4274ce5 |
Transpilation MD5: | 539586dcd4737e03768f2ccfd7b50556 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-06 09:49:41 |
Source code size: | 336 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 465 / 577 |
Version history: | 1 change(s) |
Referenced in: | [show references] |