-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I was reading your code to see how Serilog.Sink.AppCenter
was implemented and came across this.
The Dictionary<TKey, TValue>
class is not thread safe.
Thread Safety
...
To allow the collection to be accessed by multiple threads for ... writing, you must implement your own synchronization.
It's not really necessary to render properties in parallel, at most there are like ... twenty of them? I think this code only works because there are so few properties anyway it's unlikely to hit the race condition where two threads Add
to the dictionary at the same time.
taspeotis
Metadata
Metadata
Assignees
Labels
No labels