Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

The java.util.concurrent package

Pragya Keshap answered on February 20, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • What are the main Concurrent Collection classes in Java?
  • Java.util package

  • The java.util.concurrent package

    0

    Executor provides an abstraction layer over all the internal thread management tasks and manages the entire concurrent execution flow of the threads. An Executor is an object that executes tasks provided.

    The Java concurrency API provides the following three basic interfaces for executors:

    Executor: This is a simple interface that is used to launch a new task. It does not strictly require the execution to be asynchronous.

    ExecutorService: This is a subinterface of the Executor interface. It allows us to pass a task to be executed by a thread asynchronously. It provides methods to manage the termination of previously sublimed tasks through shutdown(), shutdownNow(), and awaitTermination(long timeout, TimeUnit unit). It also provides methods that return the Future object for tracking the progress of one or more asynchronous tasks.

    ScheduledExecutorService: This is a subinterface of ExecutorService. It provides various key methods, such as schedule(), scheduleAtFixedRate() and scheduleWithFixedDelay(). All schedule methods can accept relative delays and periods as arguments, and this helps us to schedule tasks to execute after a given delay or period.

    https://docs.oracle.com/javase/8/docs/api/index.html?java/util/concurrent/package-summary.html

    Popularity 3/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 20 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.