Is it safe to use a boolean flag to stop a thread from running in C#

前端 未结 4 2026
面向向阳花
面向向阳花 2020-11-29 06:27

My main concern is with the boolean flag... is it safe to use it without any synchronization? I\'ve read in several places that it\'s atomic (including the documentation).

4条回答
提交回复
热议问题