zoukankan      html  css  js  c++  java
  • .Net多线程之线程安全

    ConcurrentDictionary是.net4.0推出的一套线程安全集合里的其中一个,和它一起被发行的还有ConcurrentStack,ConcurrentQueue等类型,它们的单线程版本(线程不安全的,Queue,Stack,Dictionary)我们一定不会陌生。ConcurrentDictionary<TKey, TValue> 可由多个线程同时访问,且线程安全,用法同Dictionary很多相同,但是多了一些方法。ConcurrentDictionary 属于System.Collections.Concurrent 命名空间。
    System.Collections.Concurrent 命名空间提供多个线程安全集合类。当有多个线程并发访问集合时,应使用这些类代替 System.Collections 和 System.Collections.Generic 命名空间中的对应类型。

  • 相关阅读:
    冲刺 09
    冲刺08
    个人作业-买书
    冲刺07
    冲刺 06
    软件工程 寻找小水王
    冲刺04
    冲刺 03
    冲刺 02
    冲刺3
  • 原文地址:https://www.cnblogs.com/cnki/p/8660856.html
Copyright © 2011-2022 走看看