Title
An Empirical Study on C++ Concurrency Constructs
Abstract
Nowadays concurrent programming is in large demand. The inherent support for concurrency is therefore increasingly important in programming languages. As for C++, an abundance of standard concurrency constructs have been supported since C++11. However, to date there is little work investigating how these constructs are actually used in developing real software. In this paper, we perform an empirical study to investigate the adoption of C++ concurrency constructs in open-source applications, with the goal to provide insightful information for practitioners to use concurrency constructs efficiently. To this end, we analyze 127 open-source applications that adopt C++ concurrency constructs, comprising 34 million lines of C++ code, to conduct the experiment. The experimental results show that: (1) to implement concurrency code, thread-based constructs are significantly more often used than atomics-based constructs and task-based constructs; (2) to manage synchronization, lock-based constructs are significantly more often used than lock-free constructs and blocking constructs; (3) among the key thread-based constructs and task-based constructs (i.e. mutex, promise, and future), there is not a construct significantly more commonly misused than others; (4) small-size applications introduce concurrency constructs more intensively and more quickly than medium-size applications and large-size applications; and (5) an increasing use of standard concurrency constructs does not result in a substantially decreasing use of unstandardized concurrency constructs. Based on these findings, we make actionable suggestions for language designers, developers, and novices to assist them in designing and using C++ concurrency constructs.
Year
DOI
Venue
2015
10.1109/ESEM.2015.7321187
2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)
Keywords
Field
DocType
C++ concurrency constructs,concurrent programming,C++ language,software development,open-source applications,lock-based constructs,atomics-based constructs,task-based constructs,thread-based constructs,blocking constructs
Isolation (database systems),Programming language,Lock (computer science),Computer science,Concurrency,Multiversion concurrency control,Distributed concurrency control,Concurrent computing,Non-lock concurrency control,Optimistic concurrency control
Conference
ISSN
Citations 
PageRank 
1949-3770
1
0.35
References 
Authors
16
4
Name
Order
Citations
PageRank
Di Wu172.18
lin chen210.35
Yuming Zhou332622.11
Xu, Baowen42476165.27