无锁标准集合和教程或文章 [英] Lockfree standard collections and tutorial or articles

查看:53
本文介绍了无锁标准集合和教程或文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道无锁的常用数据类型的实现(即源代码)的良好资源.我在考虑列表,队列等吗?

Does someone know of a good resource for the implementation (meaning source code) of lock-free usual data types. I'm thinking of Lists, Queues and so on?

锁定实现非常容易找到,但是我找不到无锁算法的例子,以及CAS到底如何工作以及如何使用CAS来实现那些结构.

Locking implementations are extremely easy to find but I can't find examples of lock free algorithms and how to exactly does CAS work and how to use it to implement those structures.

推荐答案

查看Julian M Bucknall的博客.他详细描述了队列,列表,堆栈等的无锁实现.

Check out Julian M Bucknall's blog. He describes (in detail) lock-free implementations of queues, lists, stacks, etc.

http://www.boyet.com/Articles/LockfreeQueue.html

http://www.boyet.com/Articles/LockfreeStack.html

这篇关于无锁标准集合和教程或文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆