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 8261353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:22:35+00:00 2026-06-08T03:22:35+00:00

For example, My UI thread execute a SwingWorker thread, called as A. In the

  • 0

For example, My UI thread execute a SwingWorker thread, called as A. In the done() function of A thread, it create a SwingWorker thread B. Now, the code in the done() function of thread B is running on UI thread or thread A?

It make sense that, the code should be running on thread A, but if I don’t call get() function in thread A, thread A will not wait for thread B and thread A probably will finish its task. If thread B now execute the code in done() function, thread A is not there already. Then how the code be handled in this case?

  • 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-08T03:22:38+00:00Added an answer on June 8, 2026 at 3:22 am

    As per the SwingWorker API documentation, SwingWorker#done() runs on the Swing event dispatch thread (EDT). This is true for both done() methods that you mention above. You know that there’s an easy way to find out by using the SwingUtilities.isEventDispatchThread() method.

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

Sidebar

Related Questions

I need to create an method invoker that any thread (Thread B for example
I am looking at an example which code is: class SimpleThread extends Thread {
Following code create that Annotation. As described here, http://engineering.webengage.com/2012/03/12/a-peek-into-webengages-security-layer-super-cool-use-of-java-annotations /** * Defining the Asynch
can I execute a particular block of code inside a method via thread. As
Trying to execute WordCount example from cassandra and getting an error: Exception in thread
I'm making a program with while loops that execute in this manner: Main thread
I need to execute a function in a separated thread and wait until the
Trying to interrupt a running thread, in this example, t1, which is executed by
I've tried to execute first example from Linux Tutorial Posix Threads . That's what
Can someone give an example of how thread deadlock can be caused in the

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.