[erlang-questions] Pipe Operator in Erlang?

Fred Hebert mononcqc@REDACTED
Fri Jul 10 01:18:08 CEST 2015


On 07/10, Éric Pailleau wrote:
>A = catch Pid |  {somemessage, somevalue }.
>This would probably need a timeout. On other hand,  ! + receive may wait forever. | could do the same.

A = [catch Pid | {somemessage, somevalue}].

Is A equal to:

a) [Pid | {somemessage, somevalue}] (improper list)
b) [Result] (the received message)

It also ignores that two processes may have more than two communications 
going on at the same time, and that without a selective receive, it's 
not obvious that anything would match properly.



More information about the erlang-questions mailing list