Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Can't wait on a wrapped future #2370
I create a simple wrapped future in the attached file. It uses a sleep(1) to ensure that the lambda function doesn't complete too quickly to see the probem. The problem is that the wait() call completes, before the wrapped future finishes, thus the code prints:
I am done
The way things stand, there seems to be no way to wait on a wrapped future.
Here is the smallest possible use case reproducing the issue:
The code does the correct thing. The problem is that
or alternatively (forcing implicit unwrapping):
I hope that explains things.