Replies: 4 comments
-
No real objection, EDIT: Sorry, I misunderstood the sketch above. I think the general point of "how does each thread get a distinct TID" is worth thinking about, but I think you're right that it can be solved with an atomically-incremented shared global. |
Beta Was this translation helpful? Give feedback.
-
Personally, I think that we should start with the simplest primitive. Massively parallel hardware is worth considering, but the benefits perhaps sound a bit hypothetical at this point. |
Beta Was this translation helpful? Give feedback.
-
FWIW, I also do think that having to fiddle back thread IDs through global state is going to be an unnecessary, significant complication for many use cases. So even if we have spwan_multi, we'd still want a simple spawn for most use cases. |
Beta Was this translation helpful? Give feedback.
-
i'd say "no" for now as the "multiple" version would make argument passing and error handling considerably more complex. |
Beta Was this translation helpful? Give feedback.
-
The definition of
thread.spawn
includes a valuen
specifying the number of parallel invocations to execute. The motivation for this addition is described here — in summary, generality and performance. I'm curious if there are strong opinions either way: shouldthread.spawn
be able to spawnn
invocations?Beta Was this translation helpful? Give feedback.
All reactions