Open chouzar opened 5 months ago
Added a dispatch in ea8990e0ebec334366696a91b9f2914a292ac122 it is very fragile.
Had to re-think how to dispatch tasks to multiple subjects in the registry, this signature should be a good starting point:
/// Applies a callback over a group.
///
/// ## Example
///
/// ```gleam
/// chip.dispatch_group(registry, Pets, fn(subject) {
/// process.send(subject, message)
/// })
/// ```
pub fn dispatch(
registry: Registry(msg, group),
group: group,
callback: fn(process.Subject(msg)) -> x,
) -> Nil {
todo
}
The previous implementation can be found at v0.9.0.
Dispatching to subjects in the registry should be done in independent tasks.