ProcessQueueTFlush Method

Blocks the current thread, if the ProcessQueueT is active (i.e., user has called "Start" method), until all items in ProcessQueueT are processed, and then stops the ProcessQueueT.

Definition

Namespace: Gemstone.Threading.Collections
Assembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.128 -- Release Build+d4a9a653be1def5888b9be91bb1825c8655f3529
public virtual void Flush()

Remarks

Begins processing items as quickly as possible, regardless of currently defined process interval, until all items in the ProcessQueueT have been processed. Stops the ProcessQueueT when this function ends. This method is typically called on shutdown to make sure any remaining queued items get processed before the ProcessQueueT is destructed.

It is possible for items to be added to the ProcessQueueT while the flush is executing. The flush will continue to process items as quickly as possible until the ProcessQueueT is empty. Unless the user stops queuing items to be processed, the flush call may never return (not a happy situation on shutdown). For this reason, during this function call, requeuing of items on exception or process timeout is temporarily disabled.

The ProcessQueueT does not clear queue prior to destruction. If the user fails to call this method before the class is destructed, there may be items that remain unprocessed in the ProcessQueueT.

See Also