you can use 2 string list and switch between with interlockedcompareexchange
No, that would give a lock on the pointer, or even a string a piece... or it crashes at some point.
The thing is you have to lock the memory area, not just the pointer... <sigh>
If you would use your suggestion, that CAN use that, provided you, the programmer, REMEMBERS it. Which is highly unlikely in the case of almost everybody including you and OP and me, myself and I...
Interlocked functions are by definition locks anyway.....
OP should do what I wrote: use a Critical section. No further stupid replies plz. It's Sunday and I have a F1 race to watch..