Add multithreading module: odd-even, ping-pong, ordered threads, deadlock detection and fixes, virtual-thread variants (25 tests)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
== NAIVE ==
|
||||
findDeadlockedThreads: DEADLOCK
|
||||
transfer-A-to-B is WAITING on java.util.concurrent.locks.ReentrantLock$NonfairSync owned by transfer-B-to-A
|
||||
transfer-B-to-A is WAITING on java.util.concurrent.locks.ReentrantLock$NonfairSync owned by transfer-A-to-B
|
||||
after interrupting both threads: total balance = 2000
|
||||
== ORDERED ==
|
||||
both transfers completed, no deadlock to detect
|
||||
balances A=930 B=1070
|
||||
== TRY_LOCK ==
|
||||
both transfers completed, no deadlock to detect
|
||||
balances A=930 B=1070 retries>0=true
|
||||
== NAIVE on virtual threads ==
|
||||
thread states: [WAITING, WAITING]
|
||||
findDeadlockedThreads: none (virtual threads are invisible to it)
|
||||
Reference in New Issue
Block a user