文件名称:pragma-once
-
所属分类:
- 标签属性:
- 上传时间:2016-04-28
-
文件大小:33.09kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
现在版本的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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.