Java thread blocking problem

zhaozj2021-02-16  57

Several articles about Threadlocal 1, forget the thread.stop method.

2, thread.interrupt () does not interrupt the thread

3,

Truely interrupt a thread

The best way to interrupt the thread is the most recommended way to send a signal using a shared variable, telling the thread to stop running the task. The thread must verify this variable (especially during redundant operation) and then suspend tasks in order. Combine: Using Thread.Iterrupt () interrupt thread

For details: References

Start Mono Tour - Mono Installation Guide

Today, the function of adding a chat room in a business system is initially implemented. Because it is a business chat request and may be closely integrated: the program is modified by EChat. It is a lightweight chat room.

In addition, let me sweatly, I did a nearly 1 year of Java to learn; use it in Web.xml: Related references

转载请注明原文地址:https://www.9cbs.com/read-17824.html

New Post(0)