Asynchronous event data logging problem
Brought to you by:
jvarszegi
If I understand the code correctly, if an event log is
added in buffering enabled mode, since the event is
passed by reference, and the logging is done in a later
time, if the data part of the event is changed before
logging, this will effect the log.
As an example, suppose I'm using a binary formatter and
I pass an object as the data of an event. I then
continue with my code change a field of this data object.
Sometime after this change, the buffer is flushed and
the data is written to the log, but with data that is
differnet from the original one that was intended to be
written!
Is there any way to avoid this, maybe perform a deep
copy of the event data?
Shmulik Primes
shmulikp@paieon.com