All of the normal PowerShell comparison operators compare the value(s) of the variable(s). This is NOT what I’m looking for. I’m looking for a way to uniquely identify an object and see if another variable is the same object.
The context for this is parallel processing, runspaces, synchronization, and mutexes. (I’m trying to learn how to use them, but I keep running into race conditions with runspaces accessing the same resource at the same time). I’m having trouble following a variable that is supposed to be passed to all runspaces. I want to see if that variable in each runspace is in fact the same object.
(I hope that makes sense)
submitted by /u/fourierswager
[link] [comments]
The post Variable comparison – Compare object identity (NOT value) to determine if variable(s) are, in fact, the same object appeared first on How to Code .NET.