Is Task.ContinueWith thread safe?

非 Y 不嫁゛ 提交于 2020-01-15 06:18:42

问题


I have multiple threads that enqueue actions to the same task using ContinueWith() Is it thread safe? Or should I wrap it with some dedicated lock?


回答1:


It is thread safe. It even works when the task has already completed.



来源:https://stackoverflow.com/questions/31165280/is-task-continuewith-thread-safe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!