文件名称:pragma-once
- 所属分类:
- Internet/网络编程
- 资源属性:
- 上传时间:
- 2016-04-29
- 文件大小:
- 33kb
- 下载次数:
- 0次
- 提 供 者:
- b**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
现在版本的map见代码,附带简单原理说明注释,特点:
1.多线程能同时操作map的增删改查
2.确保迭代器在声明周期内只有单线程访问map,保证迭代器不失效,则查询后即可修改
3.采用保存同一线程Lock和UnLock次数的差值来确认当前线程是否锁住,防止重复锁
WIN下是测试OK的,因时间有限,Linux下编译时需要自己调试下,但是编写的函数都是支持WIN和Linux的。-See the current version of the code map, with simple principle explanation notes, features:
1. Multi-thread can simultaneously map CRUD
2. Make sure to modify the iterator only single-threaded access map in the declaration period to ensure that the iterator does not fail, the query after
3. Using the same thread Lock and save the difference between the number of UnLock to confirm whether the current thread is locked to prevent repeat lock
WIN under test is OK, because time is limited, you need to compile under Linux Debugging own, but the function is written in support of WIN and Linux.
1.多线程能同时操作map的增删改查
2.确保迭代器在声明周期内只有单线程访问map,保证迭代器不失效,则查询后即可修改
3.采用保存同一线程Lock和UnLock次数的差值来确认当前线程是否锁住,防止重复锁
WIN下是测试OK的,因时间有限,Linux下编译时需要自己调试下,但是编写的函数都是支持WIN和Linux的。-See the current version of the code map, with simple principle explanation notes, features:
1. Multi-thread can simultaneously map CRUD
2. Make sure to modify the iterator only single-threaded access map in the declaration period to ensure that the iterator does not fail, the query after
3. Using the same thread Lock and save the difference between the number of UnLock to confirm whether the current thread is locked to prevent repeat lock
WIN under test is OK, because time is limited, you need to compile under Linux Debugging own, but the function is written in support of WIN and Linux.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
pragma once.docx