Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

CONCURRENCY / CATATAN</>
Concurrency19 Des 2025

How do I use CyclicBarrier for synchronization?

In Java’s concurrency utilities, CyclicBarrier is a synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point. It is called “cyclic” because it can be re-used after the waiting threads are released. Here is a breakdown of how to use it effectively. 1. Basic Concepts […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency29 Nov 2025

How do I use Semaphore for resource control?

Semaphore is an advanced synchronization mechanism used to control access to a shared resource by multiple threads. It can maintain a set of permits, restricting how many threads can concurrently access a critical section or shared resource. If the permits are exhausted, additional threads will block until permits are released. How to Use Semaphore for […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency23 Nov 2025

How do I use ForkJoinPool for recursive tasks?

ForkJoinPool in Java is a part of the java.util.concurrent package and is designed to efficiently execute recursive tasks using a work-stealing algorithm. It works particularly well for problems that can be split into smaller subproblems and then combined to form the final result, adhering to the divide-and-conquer paradigm. Here’s how you can use ForkJoinPool for […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency22 Nov 2025

How do I schedule tasks using ScheduledExecutorService?

To schedule tasks using ScheduledExecutorService in Java, follow these steps: 1. Create a ScheduledExecutorService Use Executors.newScheduledThreadPool(int corePoolSize) to get an instance of ScheduledExecutorService. corePoolSize: Number of threads to keep in the pool. 2. Schedule Tasks The ScheduledExecutorService provides three methods for scheduling tasks: schedule: Schedule a task to run after a specific delay. scheduler.schedule(() -> […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency16 Nov 2025

How do I use ExecutorService with virtual threads?

To use ExecutorService with virtual threads in Java, you can leverage the Executors.newVirtualThreadPerTaskExecutor() method. This method creates an ExecutorService where each task is executed on a new virtual thread, managed by the Java runtime. Here’s a step-by-step guide: 1. Dependencies & Setup Ensure you are using Java 19 or newer. Virtual threads were introduced as […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency14 Nov 2025

How do I combine multiple CompletableFutures?

To combine multiple CompletableFuture objects in Java, you can use the following approaches, depending on your specific use case: 1. Combine Two Futures If you have two CompletableFuture instances and need to combine their results, use the thenCombine method. It lets you specify how to merge the results of both futures. Example: CompletableFuture<String> future1 = […]

Wayan · 3 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.