chriskohlhoff

Results 142 comments of chriskohlhoff

@keryell Would you mind expanding a little on your ideas for using properties with buffers and 'storage details or whatever'? I plan to add some example programs to propria and...

I hacked together a prototype on this branch: https://github.com/chriskohlhoff/asio/tree/any-completion-handler Example found here: https://github.com/chriskohlhoff/asio/tree/any-completion-handler/asio/src/examples/cpp20/type_erasure (The implementation should work on C++11 or later btw, even though the example is for C++20.)

`bind` doesn't like the rvalue reference qualifier on `operator()`. I've removed this and pushed an update to the branch (with some other fixes, including the `use_future` problem). On the requirement...

> For that matter, why must it be any_io_executor that type-erases the executor? Why impose that executors for handlers have an I/O context? > > May I suggest that a...

I pushed an updated branch with some changes to ensure that the `associated_executor` specialisation won't throw (and consequently `std::terminate`) if constructing the `any_completion_executor` needs to allocate but allocation fails.

That legacy non-completion-token overload of `spawn` wraps the executor in a strand, so cannot work with `any_completion_executor`. You'll need to use the completion-token overload for compatibility with `any_completion_executor`.

@ecorm Can you please try with the changes in this commit https://github.com/chriskohlhoff/asio/commit/13045b6017e13b5884b4a95b6a80f485b42f1edc @AsonWon I cannot reproduce any problem with your test program. Are you getting an unhandled exception resulting in...

@AsonWon That's the debugger telling you an exception is being thrown. Is it being caught inside the library? It should be. If so, that's not a bug.