extent-framework / extentreports-csharp

Extent Reporting Library, .NET
http://extentreports.com
Apache License 2.0
50 stars 39 forks source link

Fixed potential race condition #200

Closed arnonax-tr closed 11 months ago

arnonax-tr commented 1 year ago

The use of ThreadLocal<T> in MediaEntityBuilder looks wrong and can cause race conditions. A ThreadLocal<T> object should be initialized once, and only its Value property should be set in order to change the value per thread. Re-setting the reference to the ThreadLocal<T> object itself replaces the existing values for all threads.

anshooarora commented 11 months ago

Ah, this is indeed an issue. Merged.