Tag

Runnable

0 views collected around this technical thread.

FunTester
FunTester
Nov 28, 2024 · Backend Development

Java Multithreading Implementations

This article explains three common ways to create multithreaded Java programs—extending Thread, implementing Runnable, and using Lambda expressions—providing step‑by‑step instructions, code samples, console output, and a summary of each method’s advantages and appropriate use cases.

ConcurrencyJavaRunnable
0 likes · 6 min read
Java Multithreading Implementations
Java Tech Enthusiast
Java Tech Enthusiast
Feb 28, 2024 · Backend Development

Understanding Java Processes, Threads, and Thread Creation Techniques

The article clarifies Java processes and threads using a game analogy, then demonstrates three thread‑creation techniques—extending Thread, implementing Runnable, and implementing Callable with FutureTask—while covering run vs start, thread control methods such as sleep, join, and daemon settings.

CallableConcurrencyJava
0 likes · 9 min read
Understanding Java Processes, Threads, and Thread Creation Techniques
IT Services Circle
IT Services Circle
Dec 23, 2023 · Fundamentals

Java Multithreading: Processes, Threads, Creation Methods, and Common Controls

This article explains the fundamental concepts of processes and threads, uses a gaming analogy to illustrate their relationship, and details three ways to create threads in Java—extending Thread, implementing Runnable, and implementing Callable—along with common thread control methods such as sleep, join, and setDaemon.

CallableConcurrencyJava
0 likes · 9 min read
Java Multithreading: Processes, Threads, Creation Methods, and Common Controls
Cognitive Technology Team
Cognitive Technology Team
Apr 25, 2022 · Backend Development

Preventing ThreadLocal Information Loss in Multithreaded Java Applications by Implementing Custom Runnable and Callable (Hystrix Example)

This article explains why ThreadLocal variables can lose their values when used across thread pools, and demonstrates how to create custom Runnable and Callable wrappers that propagate HystrixRequestContext to ensure reliable ThreadLocal transmission in multithreaded Java environments.

CallableConcurrencyContextPropagation
0 likes · 8 min read
Preventing ThreadLocal Information Loss in Multithreaded Java Applications by Implementing Custom Runnable and Callable (Hystrix Example)
Selected Java Interview Questions
Selected Java Interview Questions
Apr 23, 2022 · Backend Development

Understanding ThreadPoolExecutor in Java: States, Constructors, Parameters, and Usage

This article provides a comprehensive guide to Java's ThreadPoolExecutor, covering its lifecycle states, constructor arguments, work‑queue options, keep‑alive behavior, thread factories, rejection policies, common methods, and practical code examples for Callable, Runnable, Future and FutureTask.

CallableConcurrencyExecutorService
0 likes · 20 min read
Understanding ThreadPoolExecutor in Java: States, Constructors, Parameters, and Usage
FunTester
FunTester
Dec 22, 2021 · Backend Development

Java Multithreading Tutorial: Simulating Ticket Booking with Runnable

This article explains how to implement Java multithreading using the Runnable interface through a ticket‑booking example, demonstrates common pitfalls like calling run() directly, shows code with and without Thread.sleep, and discusses concurrency issues such as thread‑unsafe ticket duplication.

ConcurrencyJavaRunnable
0 likes · 10 min read
Java Multithreading Tutorial: Simulating Ticket Booking with Runnable
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 25, 2021 · Backend Development

Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Using Callable

Through a whimsical first‑person narrative, the article explains three Java thread‑creation techniques—extending Thread, implementing Runnable (including anonymous and lambda forms), and using Callable with FutureTask—to illustrate their syntax, usage, and the ability to retrieve thread results.

Backend DevelopmentCallableConcurrency
0 likes · 7 min read
Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Using Callable
Selected Java Interview Questions
Selected Java Interview Questions
May 3, 2020 · Backend Development

Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Using Callable/Future

This article explains the three primary techniques for creating threads in Java—subclassing Thread, implementing the Runnable interface, and using Callable with Future—provides complete code examples for each method, and compares their advantages and disadvantages for practical multithreading development.

Backend DevelopmentCallableFuture
0 likes · 8 min read
Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Using Callable/Future
Selected Java Interview Questions
Selected Java Interview Questions
Nov 14, 2019 · Fundamentals

Understanding Java Thread RUNNABLE State and Its Relationship to OS Thread States

This article explains the Java RUNNABLE thread state, how it differs from traditional OS ready and running states, the impact of time‑slicing and I/O blocking, and demonstrates with code that even blocked I/O operations keep a Java thread in the RUNNABLE state.

ConcurrencyI/OJVM
0 likes · 17 min read
Understanding Java Thread RUNNABLE State and Its Relationship to OS Thread States
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 13, 2019 · Fundamentals

Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Implementing Callable

This article explains three Java thread‑creation techniques—extending the Thread class, implementing the Runnable interface, and implementing the Callable interface—provides complete code examples for each, compares their advantages and disadvantages, and recommends the best practice for concurrent programming.

CallableConcurrencyJava
0 likes · 6 min read
Three Ways to Create Threads in Java: Extending Thread, Implementing Runnable, and Implementing Callable
Java Captain
Java Captain
Sep 14, 2019 · Fundamentals

Understanding the RUNNABLE Thread State in Java

This article explains the Java RUNNABLE thread state, how it differs from traditional OS ready/running states, its relationship with time‑slicing, blocking I/O, and why the JVM reports many blocked operations as RUNNABLE, illustrated with code examples and diagrams.

ConcurrencyJVMJava
0 likes · 12 min read
Understanding the RUNNABLE Thread State in Java
Java Captain
Java Captain
Feb 19, 2018 · Fundamentals

Creating and Starting Java Threads: Subclassing Thread and Implementing Runnable

This article explains how to create and start Java threads by directly instantiating Thread, extending the Thread class, implementing the Runnable interface, handling common pitfalls such as calling run() instead of start(), and demonstrates naming threads and using thread pools with clear code examples.

ConcurrencyJavaRunnable
0 likes · 7 min read
Creating and Starting Java Threads: Subclassing Thread and Implementing Runnable