boostorg / boostorg/thread

`.get()` hangs on unwrapped, deferred future.

Open
#358 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
214
Forks
171
PR merge metrics
No merged PRs in 30d

Description

Can someone tell my why the `.get()` call here does not return?

```
#define BOOST_THREAD_VERSION 5
#include

int main()
{
auto outer = boost::make_ready_future();
outer.set_deferred();
outer.then([](auto inner) {
inner.get();
return boost::make_ready_future();
})
.unwrap()
.get();
}
```

(this is a minimal repro of this issue in a much larger codebase. i know you could return `void` from the lambda here and avoid calling `unwrap()`...)

gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
boost v1.71, v1.77

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.