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

How to shut down ExecutorService

Pragya Keshap answered on February 22, 2023 Popularity 5/10 Helpfulness 2/10

Contents


More Related Answers

  • how to cancel scheduled system shutdown
  • how to cancel a scheduled shutdown or reboot with shutdown command
  • how to cancel a scheduled shutdown or reboot with shutdown command
  • how to shutdown system immediately with shutdown command
  • What is a shutdown in the actuator?

  • How to shut down ExecutorService

    0

    Once we are done with our tasks given to ExecutorService, then we have to shut it down because ExecutorService performs the task on different threads. If we don't shut down the ExecutorService, the threads will keep running, and the JVM won?t shut down.

    The process of shutting down can be done by the following three methods-

    shutdown() method

    shutdownNow() method

    awaitTermination() method  

    Popularity 5/10 Helpfulness 2/10 Language whatever
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 22 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.