My understanding: fibers and effects both use susp...
# arrow
b
My understanding: fibers and effects both use suspend functions. Fibers can be launched into coroutine scopes/pools for parallel execution. I expect that
doWorkWithFork
takes longer purely due to the overhead of launching suspend functions into coroutines. If your effect body does something computationally intensive or takes time - a simple example is to delay 5 seconds - then you should see
doWorkWithIO
take more total time than
doWorkWithFork
. (Change the upper limit to 10 or 20 instead of 1,000,000 if using a five-second delay.)
👍 1
t
Thanks for this. I'll try it out tomorrow