Patent ID: 7716680

Claim:
A method for processing contents of a high performance message queue, comprising: receiving an indication that contents of a post message queue and a sent message queue should be processed by a user interface thread; atomically determining whether a thread other than said user interface thread is currently processing said post message queue or said sent message queue; in response to determining that no other thread is processing said post or sent message queues, indicating that said user interface thread is processing said post and sent message queues, atomically processing said sent message queue and said post message queue with use of S-Lists which are atomically created singly linked lists, wherein processing said post message queue comprises: determining whether said post message queue is empty; in response to determining that said post message queue is not empty, atomically dequeuing all messages of the entire post message queue and generating an S-List of the post message queue, which comprises a singly linked list of the post message queue; reversing said S-List of the post message queue; and extracting one or more message entries contained in said S-List of the post message queue; and when processing of said post and sent message queues has completed, providing an indication that no thread is processing said post or said sent message queues.