On 2022-05-29 23:08, Ali Çehreli wrote:
On 5/29/22 13:47, Christian Köstlin wrote:

 > Our discussion with using TLS for the
 > collectors proposed to not need any lock on the add method for
 > collector, because its thread local and with that thread safe?

It would be great that way but then the client changed the requirements on us:

On 5/26/22 12:54, Christian Köstlin wrote:
> I want to be able to dump tracings even while the program is still running.

:p

If the collected data were TLS, then the dumping thread should be able to ask each thread to provide data collected so far. That either requires synchronization, which I did, which necessitated shared Collector objects; or messaging, which would require each thread checking their Concurrency message box.

I don't know...

A third option came to me: Each thread periodically puts their data to a common location and dumper dumps whatever is aggregated up to that point. This would reduce contention.
Thats also a nice idea, e.g. the collectors could aggregate their data and only propagate it once every second or every 10 seconds, or every 1000 events or something! Will think about that some more!

Thanks a lot!
Christian

Reply via email to