Question

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!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top