Click or drag to resize

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.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
public virtual void Flush()
View Source
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