answersLogoWhite

0


Best Answer

In Java, if the main thread somehow exits then all other threads will stop executing. This generally does not happen, as the main thread will wait for all child threads to terminate before the main thread itself finishes. Interrupting this process is hard to do short of an un-handled exception or a call to System.exit.

If the child thread is also a daemon thread, then the child thread will continue to execute. If the child thread is a normal thread then, the moment System.exit is called, the child thread also terminates

If you call the join() method from the child thread, then the main thread will wait until the child is over before executing the System.exit

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What happens to child thread when you delete main thread during run-time?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

If you delete a thread on Facebook are all subsequent emails deleted?

no just the one you choose to delete


What happens to chromosome during interphase?

During interphase, chromosomes are in the form of thread-like structures called chromatin.


How do you delete messages on the Motorola droid?

To delete text messages, if using the touch screen, go to messaging. Then press the little button at the bottom that had the 4 lines (it is next to the little house symbol). When options come up, click on delete threads. But warning: doing this will delete ALL of your messages. I don't know a way on how to delete only one.


What do you mean by thread when deleting mesages samsung s3?

The "thread" is the entire string of messages between you and the other contact(s). If you delete the thread, all of your messages between each other will be deleted.


How do you close a thread on gaia?

You are not able to delete your thread but you may say that it's closed by editing your first post, by clicking the Edit button right above it, and changing the thread's name to closed.


How do you delete a thread on roblox forum?

Threads on the Roblox forums can only be deleted by Roblox moderators.


How do you delete a thread that you have started in the Community Forum?

Unless no one else has posted on your thread, you cannot delete it. If no one else has posted, view the thread and in the upper right hand corner of your post there will be a 'x'. Click that, click yes that you are sure you want to delete it, and it is gone. If someone has posted already, contact a supervisor from the list provided below, or post in the forum that you would like it deleted. A supervisor should see it and decide on the best course of action.


What happens to a spiders thread when it climbs back up?

nothing... why would it?


When you delete an iMessage thread (two person conversation) does it also get deleted from the other person's device?

no it just deletes your history


Wouldn't it tidy up the community forum if after having a query answered you could then delete your own thread?

Sometimes we like to leave threads around for someone to look at later. If you have a good reason to want your thread deleted, contact a supervisor. It would open room for abuse. If someone didn't like how their thread was going, they could delete it. If you would like it implemented, post in the suggestion box section in the Community Forum


What is implicit and explicit multi threading?

implicit multi threading is where the programming runtime determines thread safety and executes code in parallel (on different threads, anyway) without the programmer saying to do so. explicit is, of course, the opposite where the programmer must initialize a thread, give it work, manage its lifecycle, etc.


What happens when you dont read the whole thread before posting?

you look stupid