multithreading - Interactions between Java threads -


this question has answer here:

i have 2 classes (a & b) implements runnable.

both threads executed in way:

a = new a(); new thread(a).start();  b b = new b(); new thread(b).start(); 

i need stop/wait/resume thread inside thread b.

how it's possible?

actually, can't stop tread.as markspace commented, possible, should , in special cases

java thread primitive deprecation

why is thread.stopdeprecated?

because inherently unsafe. stopping thread causes unlock monitors has locked. (the monitors unlocked thethreaddeath exception propagates stack.) 


Comments

Popular posts from this blog

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

php variable $_SERVER['SERVER_ADDR'] is blank when using crontab -