Method for sending lots of mails in observer mode
An observer mode and email technology, applied in the field of cloud computing, can solve the problems of high transmission efficiency, high load and coupling, and large resource occupation, and achieve easy promotion, reduce load and coupling, and strong practicability. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0051] First add the mail information (sms for short) in each thread to the same Queue object. Queue is thread-synchronized to ensure that no data errors will occur when multiple threads add at the same time.
[0052] Then it is controlled by the synchronization block synchronized. At the same time, the class object that sends the mail controls the communication lock to form the communication between the sending thread and each requesting thread.
[0053] When the request thread add is completed, call the notify() method to wake up one of all the sending threads. The awakened sending thread enters the working state after knowing that there are "new" mails to be sent. When all the mails are sent After that, the awakened thread goes back to sleep again.
[0054] When a large number of emails need to be sent, multiple sleeping threads will be awakened one by one and enter the working state.
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 