How can I assign a name to a task in TPL

后端 未结 11 1271
礼貌的吻别
礼貌的吻别 2021-02-12 10:24

I\'m going to use lots of tasks running on my application. Each bunch of tasks is running for some reason. I would like to name these tasks so when I watch the Parallel Tasks wi

11条回答
  •  逝去的感伤
    2021-02-12 11:15

    I'm shooting blind here as I don't know the behavior of Parallel Tasks window but if it uses the debugger api adding a DebuggerDisplay attribute on your NamedTask subclass might help

提交回复
热议问题