cm0002@lemmy.world to Programmer Humor@programming.dev · 3 days agotimeoutSortimagemessage-square35linkfedilinkarrow-up1470arrow-down14cross-posted to: programmerhumor@lemmy.ml
arrow-up1466arrow-down1imagetimeoutSortcm0002@lemmy.world to Programmer Humor@programming.dev · 3 days agomessage-square35linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareptu@sopuli.xyzlinkfedilinkarrow-up4·2 days agoSo all items in the array are launched simultaneuously and ran in parallel instead of sequentially?
minus-squarescrion@lemmy.worldlinkfedilinkarrow-up3·2 days agoThey are launched sequentially, but run simultaneously, yes - at least some of them. And they run concurrently but not in parallel - using a single execution context, there is only a single thread, so no parallelism exist.
minus-squareptu@sopuli.xyzlinkfedilinkarrow-up1·2 days agoI see, I was only aware of sleep but that makes sense. Thanks for your insight.
So all items in the array are launched simultaneuously and ran in parallel instead of sequentially?
They are launched sequentially, but run simultaneously, yes - at least some of them. And they run concurrently but not in parallel - using a single execution context, there is only a single thread, so no parallelism exist.
I see, I was only aware of sleep but that makes sense. Thanks for your insight.