Thread Methods

Its late so forgive me if this is a daft question.

If I create a class whose super is thread. Do the class methods run in this thread or in the main thread. I ask because once instantiated, I can obviously access the instance methods but the thread has not been called to run.

depends on who calls them

if they’re called from the threads Run event or things that are down that code path they run as part of the thread

if something else can call them then they are not

Right, so if I need the method to run in the thread then I could have a property in my class which is say set to false by default, the run even checks for true, I externally from the main / another thread set the property to true, the thread run event sees this and calls the method.

Yes, assuming the thread is just looping, waiting for the next method to call. Of course, you could put each method into its own thread.

Thanks Tim. Problem with that is some of the methods within the one thread do interact with each other, I think if I start jumping across threads I’ll be asking for issues.

Remember it depends on which thread called the code not which thread class the code is in when written

Thanks Norman I was about to ask that.