![](../icons/collapse_all.gif)
C# | Visual Basic | Visual C++ |
public override void Flush()
Public Overrides Sub Flush
public: virtual void Flush() override
![](../icons/collapse_all.gif)
This method is only relevant when ExecuteParseOnSeparateThread is true; otherwise this method has no effect.
If the user has called Start(IEnumerable<(Of <<'(Type>)>>)) method, this method will process all remaining buffers on the calling thread until all queued buffers have been parsed - the FrameParserBase<(Of <(<'TFrameIdentifier>)>)> will then be automatically stopped. This method is typically called on shutdown to make sure any remaining queued buffers get parsed before the class instance is destructed.
It is possible for items to be queued while the flush is executing. The flush will continue to parse buffers as quickly as possible until the internal buffer queue is empty. Unless the user stops queueing data to be parsed (i.e. calling the Write(array<Byte>[]()[][], Int32, Int32) method), the flush call may never return (not a happy situtation on shutdown).
The FrameParserBase<(Of <(<'TFrameIdentifier>)>)> does not clear queue prior to destruction. If the user fails to call this method before the class is destructed, there may be data that remains unparsed in the internal buffer.