|
|
|
|
|
by tux3
972 days ago
|
|
It's worth noting that a thread's JoinHandle provides a similar interface. You can spawn your tasks, store the JoinHandle "futures", and wait for completion whenever you need the result. A difference being that Futures do nothing until polled, while threads start on their own, but that's arguably a helpful simplification for this purpose. |
|
but instead I start a future, and then to run it at all I need to wait for the result. I understand the there are tools to effect this, but it really leaves you wondering - what did I just do? start an async task and then .. block on it in order to get it to execute?