Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio/Beast] Any non-obvious reasons for no bind_executor_and_allocator?
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2018-12-20 00:57:15

On Wed, Dec 19, 2018 at 4:31 PM Sorin Fetche via Boost-users
<boost-users_at_[hidden]> wrote:
> I did come across the paper "Networking TS Associations for Call Wrappers"[1]
> but I didn't see any mention there about bind_executor or something similar for
> allocators or why this kind of approach wouldn't work.

Eh... you have `socket_` which means you have a class, so there is
really no reason not to use the intrusive mechanism for associating
your class with the executor and allocator associated with `handler_`.
This is covered in the Beast composed operation tutorial:


When I want to use my own allocator, I usually just add a "wrap"
member to the allocator which performs the association:


The need for a specific, dedicated function to perform the allocator
association has just never come up in practical code. I think this is
why Asio / Net.TS doesn't provide it.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at