8000 Java-Coding-Problems/Chapter11 at master · BBayrkdar/Java-Coding-Problems · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"path":"Chapter11","repo":{"id":943256924,"defaultBranch":"master","name":"Java-Coding-Problems","ownerLogin":"BBayrkdar","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2025-03-05T12:15:53.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/118437053?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1741176960.387082","canEdit":false,"refType":"branch","currentOid":"dffaf0da5b17d2390a40482a6378f1eb9bc2318c"},"tree":{"items":[{"name":"P213_ThreadInterruption","path":"Chapter11/P213_ThreadInterruption","contentType":"directory"},{"name":"P214_ForkJoinCountedCompleter","path":"Chapter11/P214_ForkJoinCountedCompleter","contentType":"directory"},{"name":"P214_ForkJoinFibonacci","path":"Chapter11/P214_ForkJoinFibonacci","contentType":"directory"},{"name":"P214_ForkJoinSum","path":"Chapter11/P214_ForkJoinSum","contentType":"directory"},{"name":"P215_compareAndSetForkJoinTaskTag","path":"Chapter11/P215_compareAndSetForkJoinTaskTag","contentType":"directory"},{"name":"P216_CompletableFuture","path":"Chapter11/P216_CompletableFuture","contentType":"directory"},{"name":"P217_ComposeCombineCompletableFuture","path":"Chapter11/P217_ComposeCombineCompletableFuture","contentType":"directory"},{"name":"P218_onSpinWait","path":"Chapter11/P218_onSpinWait","contentType":"directory"},{"name":"P219_Cancellation","path":"Chapter11/P219_Cancellation","contentType":"directory"},{"name":"P220_ThreadLocal","path":"Chapter11/P220_ThreadLocal","contentType":"directory"},{"name":"P220_ThreadLocalCustomer","path":"Chapter11/P220_ThreadLocalCustomer","contentType":"directory"},{"name":"P221_AddersAndAccumulators","path":"Chapter11/P221_AddersAndAccumulators","contentType":"directory"},{"name":"P221_AtomicAction","path":"Chapter11/P221_AtomicAction","contentType":"directory"},{"name":"P221_AtomicOperations","path":"Chapter11/P221_AtomicOperations","contentType":"directory"},{"name":"P222_ReentrantLock","path":"Chapter11/P222_ReentrantLock","contentType":"directory"},{"name":"P222_ReentrantLock_LockInterruptibly","path":"Chapter11/P222_ReentrantLock_LockInterruptibly","contentType":"directory"},{"name":"P222_ReentrantLock_NewCondition","path":"Chapter11/P222_ReentrantLock_NewCondition","contentType":"directory"},{"name":"P222_ReentrantLock_TryLock","path":"Chapter11/P222_ReentrantLock_TryLock","contentType":"directory"},{"name":"P223_ReentrantLockReadWriteLock","path":"Chapter11/P223_ReentrantLockReadWriteLock","contentType":"directory"},{"name":"P224_StampedLock","path":"Chapter11/P224_StampedLock","contentType":"directory"},{"name":"P224_StampedLock_tryConvertToWriteLock","path":"Chapter11/P224_StampedLock_tryConvertToWriteLock","contentType":"directory"},{"name":"P225_DiningPhilosophers","path":"Chapter11/P225_DiningPhilosophers","contentType":"directory"},{"name":".gitignore","path":"Chapter11/.gitignore","contentType":"file"},{"name":"README.md","path":"Chapter11/README.md","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eConcurrency - Deep dive\u003c/h1\u003e\u003ca id=\"user-content-concurrency---deep-dive\" class=\"anchor\" aria-label=\"Permalink: Concurrency - Deep dive\" href=\"#concurrency---deep-dive\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eChapters 10 and 11 includes 27 problems that involve Java concurrency. It starts with fundamental problems about threads lifecycle and object/class\nlevel locking. It continues with a bunch of problems about thread pools in Java including JDK 8 work-stealing thread pool. Afterwards, we\nhave problems dedicated to \u003cstrong\u003eCallable\u003c/strong\u003e, \u003cstrong\u003eFuture\u003c/strong\u003e and \u003cstrong\u003eCompletableFuture\u003c/strong\u003e. Next, we dedicate several problems to Java synchronizers (e.g., barrier,\nsemaphore, exchanger, etc). Finally, we have problems for fork/join framework, \u003cstrong\u003eReentrantLock\u003c/strong\u003e, \u003cstrong\u003eReentrantReadWriteLock\u003c/strong\u003e, \u003cstrong\u003eStampedLock\u003c/strong\u003e, atomic\nvariables, tasks cancellation, interruptible methods, and deadlocks.\u003c/p\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Concurrency - Deep dive","anchor":"concurrency---deep-dive","htmlText":"Concurrency - Deep dive"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FBBayrkdar%2FJava-Coding-Problems%2Ftree%2Fmaster%2FChapter11"}},"totalCount":24,"showBranchInfobar":true},"fileTree":{"":{"items":[{"name":"Chapter01","path":"Chapter01","contentType":"directory"},{"name":"Chapter02","path":"Chapter02","contentType":"directory"},{"name":"Chapter03","path":"Chapter03","contentType":"directory"},{"name":"Chapter04","path":"Chapter04","contentType":"directory"},{"name":"Chapter05","path":"Chapter05","contentType":"directory"},{"name":"Chapter06","path":"Chapter06","contentType":"directory"},{"name":"Chapter07","path":"Chapter07","contentType":"directory"},{"name":"Chapter08","path":"Chapter08","contentType":"directory"},{"name":"Chapter09","path":"Chapter09","contentType":"directory"},{"name":"Chapter10","path":"Chapter10","contentType":"directory"},{"name":"Chapter11","path":"Chapter11","contentType":"directory"},{"name":"Chapter12","path":"Chapter12","contentType":"directory"},{"name":"Chapter13","path":"Chapter13","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"}],"totalCount":16}},"fileTreeProcessingTime":2.3881750000000004,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/BBayrkdar/Java-Coding-Problems/branches":{"post":"kLzmAl_8dRvc0c1FYyalj0d8hJysVZhLIg3SL-nE6cYPeiFaCs5p3N4DTXgl3DjSyhlsethEGc3cNZKsjwR15g"},"/BBayrkdar/Java-Coding-Problems/branches/fetch_and_merge/master":{"post":"5MLWH4vc9JY4jvMG9tm8Z3QXZZBydpxug9ehs1vjqrZ-kW6Arzr7SlUARngbXxGuAdtkVYTz9CDmfKOM7FyfOQ"},"/BBayrkdar/Java-Coding-Problems/branches/fetch_and_merge/master?discard_changes=true":{"post":"aXz338voK99PuKnKsUe68ulEw2_a0mncPZRGJIWi6UzzL09A7w4kAyI2HLRcwRc7nIjCqixXAZJYP0QbMh3cww"}}},"title":"Java-Coding-Problems/Chapter11 at master · BBayrkdar/Java-Coding-Problems","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1ae9fa256942.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}
0