in-ram lists

Fredrik Thulin <>
Mon Mar 27 09:29:34 CEST 2006


On Friday 24 March 2006 15:11, Taavi Talvik wrote:
...
> Untested code follows:

Noted ;)

...

>      Pid = spwan(?MODULE, queue_manager, [Q]),

Pid = spawn(...)

...
> shift(Queue) ->
>      Queue ! shift,

make this

	Queue ! {self(), shift}

to match the "receive {Pid, shift}" below

...
>          {Pid,shift} ->
>              {Result, Q2} = queue:out(Q)
>              Pid ! Result,
>              queue_manager(Q2)

/Fredrik



More information about the erlang-questions mailing list