Export (0) Print
Expand All

TraceListener.IsThreadSafe Property

Gets a value indicating whether the trace listener is thread safe.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

public virtual bool IsThreadSafe { get; }

Property Value

Type: System.Boolean
true if the trace listener is thread safe; otherwise, false. The default is false.

The value of IsThreadSafe is used to determine whether to use a global lock when writing to the listener. If the value of IsThreadSafe is false, the global lock is used regardless of the value of UseGlobalLock. The global lock is not used only if the value of IsThreadSafe is true and the value of UseGlobalLock is false. The default behavior is to use the global lock whenever writing to the listener.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft