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

  • Home
  • SEARCH
  • 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 8746641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:13:36+00:00 2026-06-13T12:13:36+00:00

I have this existing Timer function: final Timer waveTimer = new Timer() { @Override

  • 0

I have this existing Timer function:

            final Timer waveTimer = new Timer() {
                @Override
                public void run() { 
                    double value = r.getByte(); // takes quite long to finish
                    wave.renderWaveOnFly(value);
            }};
            waveTimer.scheduleRepeating(50);

However it works, the UI is “blocked” and that user can’t click and do anything in the UI until the timer finishes when part of the UI calls waveTimer.cancel() which I created another Timer that cancels this timer after 10 seconds, so the UI is not usable until then.

Is there a way to implement a non-blocking timer such that it would pause for some time, perhaps just to make sure that the UI is not blocked and the user can still do something in the UI.

I mean, still have the feel that the UI is still responsive.

I am not sure about the figure, but say like every 100 millisec it stops and then give way for the UI and resume 100 millisec after the pause or something like this. I am thinking what approach to deal with.

  • 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-13T12:13:36+00:00Added an answer on June 13, 2026 at 12:13 pm

    The only way to do computations out of the UI thread in the browser is to use WebWorkers. There’s no facility to use them in GWT though: worker code requires a specialized GWT linker, and creating a WebWorker is only possible through JSNI.

    FYI, SpeedTracer uses WebWorkers.

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

Sidebar

Related Questions

I have an existing C++ win32 console app. This application contains a main program
I have been following the answer of this question: How to update existing object
I have a servlet which takes us to an existing jsp, say home.jsp. This
Reading existing code at work, I wondered how come this could work. I have
Please have a look at this: foo = function() { document.write(Unicorn <br>); return this;
So I have this problem when I run a script with PHP PDO that
I have an existing python application (limited deployment) that requires the ability to run
I have a problem while adding a new class in my existing structure. I
I have been turning and twisting this to the best of my non-existing PDO
I have this scenario: a recursive procedure (or function) is called like {DoSomething Data

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.