【问题标题】:Is it safe to use ThreadStatic variable in WCF?在 WCF 中使用 ThreadStatic 变量是否安全?
【发布时间】:2010-03-26 15:03:00
【问题描述】:

我需要将请求特定的数据放入 WCF 吗?在 WCF 中使用 ThreadStatic 变量是否安全?

【问题讨论】:

标签: .net wcf multithreading


【解决方案1】:

我建议您使用OperationContext。下面是 an example 说明如何使用它来保持某些状态。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-20
    • 1970-01-01
    • 1970-01-01
    • 2010-12-26
    • 2020-09-10
    • 2011-08-26
    • 1970-01-01
    相关资源
    最近更新 更多