c# - Does BackgroundWorker guarantee that memory changes made on the background thread become visible to the main thread? -



c# - Does BackgroundWorker guarantee that memory changes made on the background thread become visible to the main thread? -

if utilize backgroundworker modify info structures in application, there guarantee changes made on background thread visible main (ui) thread when backgroundworker completes (e.g. within runworkercompleted event handler)? bonus points: if so, mechanism guarantees this?

no, there no such guarantee. you'll need synchronize access shared memory if want access multiple threads.

of course of study if utilize bgw built in mechanisms passing info between threads, such through result or progress info stores, synchronize access data.

c# backgroundworker memory-visibility

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -