![]() | EPIterable Methods |
The EPIterable type exposes the following members.
Name | Description | |
---|---|---|
![]() | GetEnumerator | |
![]() | GetSafeEnumerator |
Returns a concurrency-safe enumerator that iterates over events representing statement results (pull API)
in the face of concurrent event processing by further threads.
In comparison to the regular enumerator, the safe enumerator guarantees correct results even as events are being processed by other threads. The cost is that the enumerator holds one or more locks that must be released via the close method. Any locks are acquired at the time this method is called. This method is a blocking method. It may block until statement processing locks are released such that the safe enumerator can acquire any required locks. An application MUST explicitly close the safe enumerator instance using the close method, to release locks held by the enumerator. The call to the close method should be done in a finally block to make sure the enumerator gets closed. Multiple safe enumerators may be not be used at the same time by different application threads. A single application thread may hold and use multiple safe enumerators however this is discouraged. |
![]() | GetSafeEnumerator(ContextPartitionSelector) |
For use with statements that have a context declared and that may therefore have multiple context partitions,
allows to safe-iterate over context partitions selectively.
|