logo
首页技术栈工具库讨论
stm-linkedlist

stm-linkedlist

Doubly linked lists are often used in imperative languages to maintain a collection of objects such that an object can remove itself easily. The same idea applies here. Thanks to STM, these lists can be shared among threads with little effort. Suppose you have a thread listening for events. You want to dispatch events to any thread that opts in. You could write a function that installs an event handler, performs an action, and removes the handler: Then, you could have your listener thread dispatch events using a function like this:
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
标签
根据用户添加的标签生成
暂无标签