Home > Back-end >  When website development will use wait Notify?
When website development will use wait Notify?

Time:12-02

I had a wait notify the practice, but I don't know what website development will use this technique when
I feel only graphical desktop thread to interact with the background threads will use wait notify
Sites are resolved through distributed lock or airflow seems no use
Blockingqueue, atomic such a collection of exchanging data between threads, I don't know when website development would use the
The local cache static data?

Website development, by the way when would use the thread pool?
Connection pooling is a big probability used, thread pool, feel framework are exported, as if they didn't have enough place to write thread pool

CodePudding user response:

Yes, I have developed more than ten years has never been used

CodePudding user response:

Depends on what kind of website, what you said is the WEB's own thread processing, this by the WEB container implements, you take the handle, but if the background need to visit some time consuming third-party data interface, generate a huge files, for example, a complex report query, you need to use your own thread pool to process, otherwise we all stuck when they visit this page,

CodePudding user response:

refer to the second floor icoolno1 response:
depends on what kind of website, what you said is the WEB's own thread processing, this by the WEB container implements, you take the handle, but if the background need to visit some time consuming third-party data interface, generate a huge files, for example, a complex report query, you need to use your own thread pool to process, otherwise we all stuck when they visit this page,

This is not the mq asynchronous?

CodePudding user response:

reference 1/f, d hand response:
yes, I have developed more than ten years not to

Feel website development understand the JVM practical multithreaded, really almost have no treatment

CodePudding user response:

reference 4 floor kathy_koo response:
Quote: reference 1/f, d hand response:
yes, I have developed more than ten years not to

Feel website development understand the JVM practical multithreaded, really almost no his own processing


Many frameworks to help you deal with now, without their own design,

CodePudding user response:

Do website development, basically use less than wait/notify

Express company for equipment to monitor, not doing a website, it is often used, generally are producers and water problems, maintain a product Queue, preserved by the Queue, then the producer and consumer threads in this thread on a Queue synchronization (synchronized), producers of output products, put into the Queue, and then call Queue. The notifyAll notify all threads waiting for consumers already have products; While consumers thread if it is found that the queue is empty, calls the queue. The wait () to wait for, until the other thread calls notifyAll awakening,
  • Related