Basic Java Multi-Threading Question
Posted
by Veered
on Stack Overflow
See other posts from Stack Overflow
or by Veered
Published on 2010-03-15T04:54:20Z
Indexed on
2010/03/15
4:59 UTC
Read the original article
Hit count: 347
When an object is instantiated in Java, is it bound to the thread that instantiated in? Because when I anonymously implement an interface in one thread, and pass it to another thread to be run, all of its methods are run in the original thread. If they are bound to their creation thread, is there anyway to create an object that will run in whatever thread calls it?
© Stack Overflow or respective owner