Deferred cancellation: a behavioral pattern

Philipp Bachmann
{"title":"Deferred cancellation: a behavioral pattern","authors":"Philipp Bachmann","doi":"10.1145/1753196.1753218","DOIUrl":null,"url":null,"abstract":"People who design their own pool of worker threads [33, pp 290--298] or processes have to consider how to shut down the workers again or how to dynamically adapt the number of workers to varying load. Especially with regard to application termination you may have the choice between an immediate destruction of the pool and a more graceful shutdown. The pattern proposed helps to portably implement such termination and load adaptation mechanisms that assume you voted for the second choice. The main area of application are the internals of active objects [40] and similar designs that delegate work to a pool of threads or processes to execute service requests asynchronously from their actual invocation. For the pattern proposed we identified usage examples in popular existing applications or libraries. Both a real world example and sample code accompany the pattern presentation. This sample code is in C++. The presentation of the pattern follows the style well known from [11] and [44]. This pattern is based upon other patterns. Typographic conventions for references to other patterns are similar to [3]. A Glossary provides thumbnails of many of these patterns.","PeriodicalId":332993,"journal":{"name":"Proceedings of the 15th Conference on Pattern Languages of Programs","volume":"108 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-10-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 15th Conference on Pattern Languages of Programs","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1753196.1753218","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

Abstract

People who design their own pool of worker threads [33, pp 290--298] or processes have to consider how to shut down the workers again or how to dynamically adapt the number of workers to varying load. Especially with regard to application termination you may have the choice between an immediate destruction of the pool and a more graceful shutdown. The pattern proposed helps to portably implement such termination and load adaptation mechanisms that assume you voted for the second choice. The main area of application are the internals of active objects [40] and similar designs that delegate work to a pool of threads or processes to execute service requests asynchronously from their actual invocation. For the pattern proposed we identified usage examples in popular existing applications or libraries. Both a real world example and sample code accompany the pattern presentation. This sample code is in C++. The presentation of the pattern follows the style well known from [11] and [44]. This pattern is based upon other patterns. Typographic conventions for references to other patterns are similar to [3]. A Glossary provides thumbnails of many of these patterns.
延迟取消:一种行为模式
设计自己的工作线程池的人[33,pp 290—298]或进程必须考虑如何再次关闭工作线程或如何动态地调整工作线程的数量以适应不同的负载。特别是在应用程序终止方面,您可以在立即销毁池和更优雅地关闭之间做出选择。所提出的模式有助于可移植地实现这样的终止和负载适应机制,这些机制假定您投票支持第二种选择。应用程序的主要领域是活动对象b[40]的内部和类似的设计,这些设计将工作委托给线程或进程池,以便从实际调用异步执行服务请求。对于所提出的模式,我们确定了流行的现有应用程序或库中的使用示例。模式演示中附带了一个真实世界的示例和示例代码。这个示例代码是用c++编写的。模式的表示遵循[11]和[44]中众所周知的样式。这种模式是基于其他模式的。引用其他模式的排版约定类似于[3]。术语表提供了许多这些模式的缩略图。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信