mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Cleanup: Use int instead of long to avoid Interlocked.Read (#13069)
This commit is contained in:
1 parent
3a2c164ec6
commit
e41a28c2bd
1 file changed
+3
-3
@@ -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