-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
The signature of actor.call
is unclear of what magic number to put as the second argument.
pub fn call(
subject: process.Subject,
waiting timeout: Int,
sending make_message: fn(process.Subject(reply)) -> message,
) -> reply
If a reply is not received within the given timeout then the sender process crashes rather than leaving the processes in an invalid state.
As Gleam is a typed language, I would expect a Duration
for this kind of value, instead of a undocumented Int
that must be in milliseconds.
Alternatives:
- rename the parameter as
timeout_ms
- make it clear in the documentation that it expects milliseconds
What do you think?
Metadata
Metadata
Assignees
Labels
No labels