Add experienced-2-3y module: 31 scenario questions (core Java, collections/streams, concurrency, Spring Boot 4.2, JPA N+1, REST problem details, SQL) with 7 asserting tests and 8 transcripts
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6u469kis46DspusiL
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
4180e746ef
commit
76012dd8c3
@@ -0,0 +1,16 @@
|
||||
== Q13: volatile is visibility, not atomicity ==
|
||||
volatile int, 8 threads x 100000 increments: LOST UPDATES (expected 800000)
|
||||
AtomicInteger, same work: 800000
|
||||
== Q14: exceptions inside an ExecutorService ==
|
||||
after submit(): no output yet, future.isDone() = true
|
||||
future.get() -> ExecutionException, cause = java.lang.IllegalStateException: boom from submit
|
||||
uncaught handler on worker: boom from execute
|
||||
== Q15: ConcurrentHashMap is safe per call, not per sequence ==
|
||||
containsKey/put/get sequence: LOST UPDATES (expected 80000)
|
||||
merge(key, 1, Integer::sum): 80000
|
||||
== Q16: ReentrantLock.tryLock with a timeout ==
|
||||
tryLock(50 ms) while another thread holds it -> false
|
||||
tryLock() after the holder released it -> true
|
||||
== Q17: 10,000 blocking tasks on virtual threads ==
|
||||
tasks completed = 10000, ran on virtual threads = 10000
|
||||
finished in under 5 seconds: true
|
||||
Reference in New Issue
Block a user