| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I'm opening this PR to discuss the implementation and seek input. A few known issues:
|
Sorry, something went wrong.
|
I made a modification to mitigate known issue 2 above: it now will attempt to lock FIRST, only doing deadlock detection if that attempt fails. |
Sorry, something went wrong.
|
should safe fail when mx (java.lang.management) not available e.g. on Android |
Sorry, something went wrong.
|
@kares Indeed...it would likely just skip this code. This general pattern may be applicable elsewhere, so this should move into its own utility class. |
Sorry, something went wrong.
|
Punting to 9.1.4.0. Too risky to stitch in at the last moment for 9.1.3.0. |
Sorry, something went wrong.
|
Needs rebase and more thought. Bumping and rebasing. |
Sorry, something went wrong.
This detector works only with two threads, using the following heuristic: 1. If the lock is already acquired, obtain its owner thread. 2. Check if the owner thread is waiting on a lock. 3. If the lock the owner is waiting on is held by the current thread, raise an error. 4. If there's no owner and no deadlock, try to lock the thread for 500ms + rand(100)ms. 5. If the file has been locked, return success. 6. Otherwise, start over at 1. We may want a more advanced detector that can handle arbitrarily many threads, but it would be much heavier and require scanning all threads in the system, including those unrelated to the current program and those not actually trying to require files. See #3341.
|
De-targeting. This may be useful some day but there's work required and many open questions. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This detector works only with two threads, using the following
heuristic:
thread, raise an error.
500ms + rand(100)ms.
We may want a more advanced detector that can handle arbitrarily
many threads, but it would be much heavier and require scanning
all threads in the system, including those unrelated to the
current program and those not actually trying to require files.
See #3341.