Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

boost::asio: Is there any name for the "strand" type of synchronization primitive?

The boost::asio library provides an interesting synchronization model using "strands" to serialize accesses to a resource that would normally require locks. This increases parallelism by essentially turning every lock operation into an enqueue.

Searching for "strands" only yields relevant results about asio, even though they seem like an exceptionally useful primitive for multithreading. Is there some other term for them that I'm missing?

Link to the asio strand documentation: http://www.boost.org/doc/libs/1_54_0/doc/html/boost_asio/reference/io_service__strand.html

like image 650
mionic Avatar asked Nov 27 '25 00:11

mionic


1 Answers

I am not aware of an official name for the construct.

The proposal based on Boost.Asio (N2175 - Networking Library Proposal for TR2) documents the strand class, but does not reference any relevant material. Also, the Intel compiler documentation makes a few references to strand in its execution model, defining it as "any sequence of instructions without any parallel control structures."

like image 83
Tanner Sansbury Avatar answered Nov 28 '25 15:11

Tanner Sansbury



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!