【发布时间】:2013-12-19 06:45:36
【问题描述】:
我需要在我的 ASP.Net MVC 应用程序中实现一个多线程全局变量。
ConcurrentDictionary<T> 是理想的选择,但如何让我的应用程序中的每个用户会话都可以访问它?
这样的东西可以解决问题吗?
public static class GlobalStore
{
public static ConcurrentDictionary<string, DateTime> GlobalVar { get; set; }
}
我需要多个用户才能读取/写入此对象。
【问题讨论】:
标签: c# asp.net multithreading asp.net-mvc-4