Skip to content

Commit

Permalink
Use System.Threading.Lock under .NET 9.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrainger committed Nov 28, 2024
1 parent cf952ed commit a2cab93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MySqlConnector/Core/ServerSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,11 @@ protected override void OnStatementBegin(int index)
private static readonly PayloadData s_selectConnectionIdVersionWithAttributesPayload = QueryPayload.Create(true, "SELECT CONNECTION_ID(), VERSION();"u8);

private readonly ILogger m_logger;
#if NET9_0_OR_GREATER
private readonly Lock m_lock;
#else
private readonly object m_lock;
#endif
private readonly ArraySegmentHolder<byte> m_payloadCache;
private readonly ActivityTagsCollection m_activityTags;
private State m_state;
Expand Down

0 comments on commit a2cab93

Please sign in to comment.