YUART - How to implement this code in Spawn?...
How to implement this code in Spawn?
Solution:Jump to solution
Correct Spawn code is
```
// Spawn's model of concurrency is going to be very similar to Go's.
// Learn more about concurrency in the documentation:...
15 Replies
Use t.assert_eq instead assert
Oh sorry I'm stupid
assert is not implemented yet
Not tha code 😅
I updated the code I want to implement in Spawn
Use runtime.Handle as array type
And you need to call join in loop on this array of handles
Ok, trying
Outputs
oops. you need
runtime.Handle[unit]
and push instead <<
can you create an issue for this case? we need an error about not instantiated use of generic struct []runtime.Handle{}
Works
Solution
Correct Spawn code is
Ok
another version with results
btw this particular example has nothing similar to the Go model as stated in the comment 😄
Yeah, I removed that 😅
going to be very similar to Go
next week