4 ms·
IME, using reference counts there is also not a good idea. In practice I think it's better to treat async tasks just like goroutines and then use channels to co
by md8z 5y ago
IME, using reference counts there is also not a good idea. In practice I think it's better to treat async tasks just like goroutines and then use channels to communicate.
- convolvatron 5y agoI've found that when I've structured things that way in the past I do have some performance issues if the grain is very small. more importantly to me is that those machines dont really compose that well over larger scales - that is to add a new component I need to look at the overall scheduling and connectedness of the existing components and need to rework them to order to handle a new control flow. it is a nice model. i think it isn't appropriate for some things, so I tend not to reach for it by default.
- md8z 5y agoBy default I think the simplest model is to just use references, that should work if you don't move anything into the async task.