Statement cancellation handler works in it’s own thread and perform memory
context switches. Main worker thread in error handling code also uses memory
contexts. Memory context switch is performed via global variable
CurrentMemoryContext which is not thread safe.
This patch marks CurrentMemoryContext as volatile to make it thread safe.
Statement cancellation handler works in it’s own thread and perform memory context switches. Main worker thread in error handling code also uses memory contexts. Memory context switch is performed via global variable CurrentMemoryContext which is not thread safe.
This patch marks CurrentMemoryContext as volatile to make it thread safe.