News

News

RSS feed
07/01/2020
Richard's May/June Update

Boost 1.74 - Interesting Developments in Asio We’re currently beta-testing Boost 1.74, the lead-up to which has seen a flurry of activity in Asio, which has impacted Beast. Recent versions of Asio have moved away from the idea of sequencing completion handlers directly on an io_context (which used to be called an io_service) towards the execution of completion handlers by an Executor. The basic idea being that the executor is a lightweight handle to some execution context, which did what the io_context always used to do - schedule the execution of completion handlers. The changes to Asio have been tracking The Networking TS which describes a concept of Executor relevant to asynchronous IO. The Unified Executors proposal unifies the concepts of io execution and the general concept of “a place to execute work” - a somewhat more generic idea than merely an IO loop or thread pool. Work has been ongoing by the members of WG21 to produce an execution model that serves all parties’ needs. Courtesy of an incredible effort by Chris Kohlhoff, Latest Asio and Boost.Asio 1.74 has been updated to accommodate both models of executors, with the Unified Executors model being the default. It’s important to note...

Continue Reading
06/04/2020
Automated Documentation Previews

Overview Greetings, and welcome to my first blog post at The C++ Alliance. I’ve recently begun working on an interesting project for the Alliance which might also have more widespread applicability. The same requirement could possibly apply to your organization as well. Consider an open-source project that has multiple contributors who are submitting changes via pull-requests in Github. You’d like to have assurances that a pull-request passes all tests before being merged. That is done with continuous integration solutions such as Travis or Circle-CI, which are quite popular and well-known. Similarly, if the submission is documentation, you would like to be able to view the formatted output in it’s final published format so you can review the layout, the colors, and so on. What would be the best way to build and publish documentation from pull requests? Perhaps the first thought would be to include the functionality in Travis or Circle-CI. And that is certainly possible. However, in some cases there may be sensitive passwords, ssh keys, or other tokens in the configuration. Is it safe to allow random pull requests, from conceivably anyone on the whole internet, to trigger a Circle-CI build that contains authentication information? Let’s explore that...

Continue Reading
05/08/2020
Krystian's April Update

Overview Boost 1.73.0 has been released! Save for some minor documentation issues, Boost.StaticString enjoyed a bug-free release, so most of this month was spent working on Boost.JSON getting it ready for review. Unfortunately, I could not spend too much time working due to school and final exams, but now that those have passed I’ll be able to put in significantly more time working on projects such as Boost.JSON. Boost.JSON A good portion of my work on Boost.JSON was spent updating the documentation to reflect the replacement of the storage allocator model with boost::container::pmr::memory_resource (or std::pmr::memory_resource in standalone). The old model wasn’t necessarily bad, but using memory_resource permits the use of existing allocators found in Boost.Container/the standard library, eliminating the need for writing proprietary allocators that only work with Boost.JSON. Even though storage will be going away, storage_ptr will remain to support shared ownership of a memory_resource – something that polymorphic_allocator lacks. As with polymorphic_allocator, storage_ptr will still support non-owning reference semantics in contexts where the lifetime of a memory_resource is bound to a scope, giving users more flexibility. I also worked on monotonic_resource, the memory_resource counterpart to pool. This allocator has one goal: to be fast. I ended up adding...

Continue Reading
04/30/2020
Richard's April Update

Boost 1.73 Released and other Matters The 1.73.0 release of Boost took up more attention than I had anticipated, but in the end all seemed to go well. Since then I’ve been working through the issues list on GitHub and am now starting to make some headway. I cam across a few other interesting (to me) topics this month. (Possibly) Interesting Asio Things Last month I asked the question, “Is it possible to write an asynchronous composed operation entirely as a lambda?”. This month I went a little further with two items that interested me. The first is whether asio’s async_compose can be adapted so that we can implement a complex composed operation involving more than one IO object easily using the asio faux coroutine mechanism. The second was whether is was possible to easily implement an async future in Asio. Async Asio Future Here is my motivating use case: auto p = async::promise<std::string>(); auto f = p.get_future(); // long-running process starts which will yield a string start_something(std::move(p)); // wait on the future f.async_wait([](some_result_type x) { // use the x }); // or auto str = co_await f.async_wait(net::use_awaitable); // or shorthand auto str = co_await f(); The salient points here...

Continue Reading
04/28/2020
New Boost Release

Boost 1.73 New Library StaticString: A dynamically resizable string of characters with compile-time fixed capacity and contiguous embedded storage, from Krystian Stasiowski and Vinnie Falco. Boost Release Notes

Continue Reading