In short, I am trying to reproduce the problem of a sleeping hairdresser in Erlang.
In my decision, I decided that for all pending processes I would put them on a list. Then, as soon as this happens, I will go from this PID list.
Sorry when I call
length(myListOfPids).
it does not work, for example:
length([<0.46.0>]).
* 2: syntax error before: '<'
Is there a way to store the PID code so that I can remember and use them normally? i.e.
PID ! message
... just in case, the actual error that I get when starting my program matters:
=ERROR REPORT==== 1-Jul-2010::05:50:40 ===
Error in process <0.44.0> with exit value:
{badarg,[{erlang,length,[<0.46.0>]},{barber1,waitingRoom,2}]}
barber1 is my module, waitingRoom is a function that keeps track of which processes are waiting
source
share