Project

General

Profile

Actions

Feature #13183

open

c++20 co-routines with boost::asio and boost::cobalt

Added by max p about 2 months ago. Updated 19 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
Start date:
11/04/2024
Due date:
% Done:

0%

Estimated time:

Description

Hello,

Would it be possible to add the support for c++20 co-routines (via preprocessor macro, like WT_USE_CPP20_COROUTIES)?
Wt is already using boost::asio, so this could be utilized to provide this functionality.
boost::cobalt gives a nice functionality on top of the boost::asio.

Providing co-routines would greatly simplify the applications heavily depending on external resources that must be loaded on a separate thread and then continuation callbacks must be posted on the WebSession thread.

Kind regards,
Max.

Actions #1

Updated by Matthias Van Ceulebroeck about 2 months ago

  • Target version set to future

Hey max,

I generally like the idea, but the support for coroutines isn't yet complete on all platforms/compilers. I will schedule this for the future, as I do think this is really worth a second look soon!

Best,
Matthias

Actions #2

Updated by max p 19 days ago

Matthias Van Ceulebroeck wrote in #note-1:

Hey max,

I generally like the idea, but the support for coroutines isn't yet complete on all platforms/compilers. I will schedule this for the future, as I do think this is really worth a second look soon!

Best,
Matthias

That's great!
The limitations of platforms and compilers that do not support coroutines can be mitigated by disabling it by default and enabling only when WT_USE_CPP20_COROUTIES is defined.
That was my original idea, that coroutines are enabled on request and not by default.

Nevertheless, can't wait to see it in Wt :)

BR,
Max.

Actions

Also available in: Atom PDF