Dynamic adjustment method for suspension time of message thread

The invention provides a dynamic adjustment method for suspension time of a message thread. The method comprises the steps of 1) setting TS as sleep time of the thread; 2) enabling a frequency of sending messages to a queue to be smaller than a frequency of obtaining message processing from the queu...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: LI DENGGEN, YUE LONG, YIN ANXU
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention provides a dynamic adjustment method for suspension time of a message thread. The method comprises the steps of 1) setting TS as sleep time of the thread; 2) enabling a frequency of sending messages to a queue to be smaller than a frequency of obtaining message processing from the queue; 3) allowing the message processing not to exceed allowed message response time, namely, if processing time of the last message in the message queue meets a response time requirement, then all the messages meet the response time requirement; 4) enabling the thread to continue to process the messages only after sleeping for a period of time, and setting shortest sleep time of the thread; 5) setting longest sleep time of the thread; and 6) performing organizing on the steps to ensure that the sleep time of the thread is longest when TS=TSmax_R. 本发明提供了种消息线程挂起时间的动态调节方法,所述方法包括:1)设TS为线程休眠时间;2)令发送消息至队列的频率小于从队列中获取消息处理的频率;3)消息处理不超过允许的消息响应时间,即消息队列中最后个消息的处理时间达到响应时间要求,则所有消息都满足响应时间要求;4)令线程休眠段时间后才能继续处理消息,并设置个线程的最小休眠时间;5)设置个线程的