javafiberfibersquasarquasar-framework

Quasar fiber - difference between join() and get()


The title says it all. There's no explicit instructions on these two methods as to which should be used.


Solution

  • Both methods wait for the fibre to complete. The get() method returns the result, and the join() method doesn't.

    Why does the API have both methods? Because the respective interfaces (Future and Joinable) require both.

    Which to use? Which ever does what you need!