Can Interlocked.Exchange exchange two byte[] arrays?
-
29-10-2019 - |
题
I want to swap two byte arrays atomically, without the need for a lock. i.e. I don't want to do
byte[] src;
byte[] dest;
lock(synchLock)
{
dest = src;
}
Is this possible with Interlocked.Exchange ? I see it works for int arrays in docs.
Thanks!
没有正确的解决方案
不隶属于 StackOverflow