Threads And Concurrency

Java Threads And Concurrency - 12 Cards
Click here to toggle all cards
Concurrency
Technique for executing multiple threads simultaneously
Threads
Concurrent processes that allow for efficient resource utilization
Thread Class
Used to create and manage threads in Java
Thread.start()
Method that begins the execution of a thread
Thread.sleep()
Method that pauses the current thread for a specified time
Thread.join()
Method that waits for a thread to finish its execution
Runnable Interface
Interface used for creating and running threads in Java
Thread.setPriority()
Method that sets the priority of a thread
Thread.yield()
Method that pauses the current thread to allow other threads to execute
ExecutorService
Simplifies managing threads in Java
newFixedThreadPool()
Method that creates a fixed-size thread pool for thread reuse
CallableTask
Executes tasks asynchronously and returns a result