General discussion about thread (Confusion)

general discussion forum gives members an opportunity to discuss proposed policy ideas prior to submitting as a formal
Post Reply
admin
Site Admin
Posts: 50
Joined: Sun Aug 08, 2021 7:49 am

General discussion about thread (Confusion)

Post by admin »

I just want to know what is the difference between the following two methods of invoking the thread.

Please look at the two pictures of the two scenarios

Image
Image
Thread Implementation Scenario 1

Thread Implementation Scenario 2

My problem is that the behavior I faced is when I follow "scenario 1" I lost control of my program and the

"// other commands" in MyClass didn't run

when I followed scenario two my sequence was smooth. has anyone noticed this behavior or is it a malfunction?

Kindly give your opinions.

Regards,
Post Reply