Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8846083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:53:28+00:00 2026-06-14T11:53:28+00:00

I was using an ExecutorService to schedule tasks to be executed in future. After

  • 0

I was using an ExecutorService to schedule tasks to be executed in future. After seeing some “odd” behavior where my Callable was getting executed before I called get() on the Future object returned by submitting my Callable to the ExecutorService pool, I read some documentation and found that the submitted task will get executed between the time it gets submitted or at the latest when get() is called on the Future object.

My question – is there any class that would allow Callables to be submitted to it and ONLY executed when get() is called on it? At this point, it seems like just managing the Callables myself and calling call() on them myself when I am ready for them to be executed seems like it’d accomplish what I want, but I wanted to make sure there was no service already implemented that accomplished this.

In short, is there any alternative to ExecutorService that lets me control when Callables submitted to it are called? Note – the time in the future that I want them called is variable and not determined as I may decide not to call them so a ScheduledExecutorService pool won’t work here.

Thanks much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:53:29+00:00Added an answer on June 14, 2026 at 11:53 am

    Sounds like you really want to use a Queue<Callable> instead and just poll the queue for tasks.

    That way you can submit as many tasks as you like and execute them at your will – one by one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using java.util.concurrent.ExecutorService.submit(Callable<T>) to invoke Callable tasks that return void. The reason that
I submit some some Future tasks using a CompletionService wrapped round a 2 thread
say I'm using a ExecutorService ex = Executors.newFixedThreadPool(nrofthreads); spinning up some work and waiting
I'm firing off tasks using an ExecutorService, dispatching tasks that need to be grouped
I am executing a Callable Object using ExecutorService thread pool. I want to give
I'm using an ExecutorService to execute some Callables, but the name of the threads
I wrote an application that runs some threads using ExecutorService and waits until they
Im using the ExecutorService in Java to invoke Threads with invokeAll() . After, I
I have a single thread pool ExecutorService object. At some time in the future
I am using an unbounded, thread-caching Java-ExecutorService which concurrently processes my tasks. Now I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.