| | Recently, I stumbled upon an interesting use case for sequenceCount. When | the AsynAppender buffer is full and a event is processed, one of the | waiting threads is notified that a slot became available. The order in | which threads are notified is not specified by the Java language. They can | be notified more or less in random order. | | Consequently, events may be output out of order by AsynAppender. Sequence | count can help the user to order the output. | | The above should be viewed as a marginally important use case for | sequenceCount, but a use case it is nonetheless.
This should be done with a "waiting list" pattern, rather than relying on this specific "feature" of the actual LoggingEvent. I feel this rather clearly points out the high synchronization that obviously must have gone into the sequenceCount when it later can be used to order the actual output of the LoggingEvents. Endre --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
