extent-framework / extentreports-csharp

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

Fixed potential race condition #200

Closed arnonax-tr closed 7 months ago

arnonax-tr commented 8 months 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 7 months ago

Ah, this is indeed an issue. Merged.