mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Cleanup: Use int instead of long to avoid Interlocked.Read (#13069)
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
/// <param name="actionArgs">Event argument.</param>
|
||||
protected void NewCmdletActionHandler(object cimSession, CmdletActionEventArgs actionArgs)
|
||||
{
|
||||
DebugHelper.WriteLogEx("Disposed {0}, action type = {1}", 0, this._disposed, actionArgs.Action);
|
||||
DebugHelper.WriteLogEx("Disposed {0}, action type = {1}", 0, this.Disposed, actionArgs.Action);
|
||||
|
||||
if (this.Disposed)
|
||||
{
|
||||
@@ -443,11 +443,11 @@ namespace Microsoft.Management.Infrastructure.CimCmdlets
|
||||
{
|
||||
get
|
||||
{
|
||||
return Interlocked.Read(ref this._disposed) == 1;
|
||||
return this._disposed == 1;
|
||||
}
|
||||
}
|
||||
|
||||
private long _disposed;
|
||||
private int _disposed;
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
|
||||
Reference in New Issue
Block a user