File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,18 @@ pub fn send(subject: Subject(message), message: message) -> Nil
120120///
121121/// The `within` parameter specifies the timeout duration in milliseconds.
122122///
123- @ external ( erlang , "gleam_erlang_ffi" , "receive" )
124- pub fn receive_forever ( from subject : Subject ( message) ) -> message
125-
126123@ external ( erlang , "gleam_erlang_ffi" , "receive" )
127124pub fn receive (
128125 from subject : Subject ( message) ,
129126 within timeout : Int ,
130127) -> Result ( message, Nil )
131128
129+ /// Receive a message that has been sent to current process using the `Subject`.
130+ ///
131+ /// Same as `receive` but waits forever and returns the message as is.
132+ @ external ( erlang , "gleam_erlang_ffi" , "receive" )
133+ pub fn receive_forever ( from subject : Subject ( message) ) -> message
134+
132135/// A type that enables a process to wait for messages from multiple `Subject`s
133136/// at the same time, returning whichever message arrives first.
134137///
You can’t perform that action at this time.
0 commit comments