1 | static Either<O, Thread> evalWithTimeoutReleasingDBLock(int timeoutMS, fO r) {
|
2 | bool hadLock = unlockIfHolding(dbLock()); |
3 | try {
|
4 | ret assertNotNull(evalWithTimeout(timeoutMS, r)); |
5 | } finally {
|
6 | if (hadLock) lock(dbLock()); |
7 | } |
8 | } |
9 | |
10 | static Either<O, Thread> evalWithTimeoutReleasingDBLock(double timeoutSeconds, fO r) {
|
11 | ret evalWithTimeoutReleasingDBLock(toMS_int(timeoutSeconds), r); |
12 | } |
Began life as a copy of #1009329
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: | #1011621 |
| Snippet name: | evalWithTimeoutReleasingDBLock - give the other thread a chance! |
| Eternal ID of this version: | #1011621/6 |
| Text MD5: | a5d4a3a97d851a3954cbc201d269b277 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-27 12:55:17 |
| Source code size: | 405 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 592 / 661 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |