Computer Science, asked by vn2727197, 10 months ago

How to avoid threads.

Answers

Answered by thekinjal
0

Answer:

Modern ways to suspend/stop a thread are by using a boolean flag and Thread. interrupt() method. Using a boolean flag: We can define a boolean variable which is used forstopping/killing threads say 'exit'. Whenever we want to stop a thread, the 'exit' variable will be set to true.

.

.

◇◇♡

Similar questions