Skip to content

Commit 3279637

Browse files
committed
Update rationale for pitfalls
1 parent 59fb983 commit 3279637

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/core/diagnostics/eventsource-collect-and-view-traces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ this isn't required. Following is an example `EventListener` implementation that
276276
> [!WARNING]
277277
> Potential Pitfalls when implementing EventSource Callbacks via EventListener include deadlocks, infinite recursions, and uninitialized types.
278278
>
279-
> When implementing EventSources, be cautious with invoking lock-acquiring APIs within EventSource callbacks. EventSource instances are initialized early in the runtime, before some core features are fully initialized. As a result, the re-entrant behavior of EventSource callbacks may cause deadlocks if the callback attempts to acquire locks already held by the thread that triggered the callback.
279+
> EventSource instances are initialized early in the runtime, before some core features are fully initialized. As a result, acquiring locks inside an EventSource callback like <xref:System.Diagnostics.Tracing.EventListener.OnEventWritten%2A> when the thread normally would not have done so may cause deadlocks.
280280
>
281281
> To mitigate this risk, consider the following precautions:
282282
>

0 commit comments

Comments
 (0)