mercury icon indicating copy to clipboard operation
mercury copied to clipboard

HG examples: Possible data races

Open ryancaicse opened this issue 2 years ago • 1 comments

Hi, should thread-shared static variable hg_progress_shutdown_flag be protected by locks?

https://github.com/mercury-hpc/mercury/blob/ce847b771def57e9d63f33313ed81149b366648b/Examples/src/example_rpc_engine.c#L50-L63

https://github.com/mercury-hpc/mercury/blob/ce847b771def57e9d63f33313ed81149b366648b/Examples/src/example_rpc_engine.c#L66-L84

ryancaicse avatar Apr 14 '22 13:04 ryancaicse

Yes you're right sorry, that's been low-priority for me on my list but that should be fixed to either use an atomic variable or use a lock.

soumagne avatar May 27 '22 15:05 soumagne