boostorg / boostorg/cobalt

Request, create empty promise object that can be set later outside of a coroutine.

Open
#203 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
347
Forks
47
Avg merge
3d 8h
Merged PRs (30d)
1

Description

Hi,

I was wondering if it would be possible to add a method that would set a coroutine object from the "outside".
For example
```
boost::cobalt::promise request;
// save the promise somewhere in a data struct
// ....
// recieve some network data
// match it with a request
request.set(data);
```
this would then resume any coroutine that is currently co_awaited on this promise. I found a way around this by using async channels but was wondering if it would be at all possible to do this without them?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.