I was reading about Fluture, and one way to consume a Future is to call fork. That is all understandable so far but in documentation it states:
"Generally, one only needs to call fork
in a single place in the entire program".
What does it mean? What if I'm using Futures to fetch some content from Api request, I would probably want to do this multiple times throughout the code each with different resolve functions. All of these Futures would then require their own forks, right?
It is expected that you build your entire program as a big
Future
, composed of smaller futures (like many Api calls chained to each other), and only in your main entrypoint do callfork()
.