Hi, playing with tinymq here.  I have a very simple gen_server which 
subscribes on initialisation as follows:

init([]) ->
    tinymq:subscribe(?MODULE, now, self()),
    {ok, #state{}}.

modified handle_info to dump any messages received (I'm assuming they 
appear at the handle_info level):

handle_info(Info, State) ->
    io:format("handle_info: ~w~n", [Info]),
    {noreply, State}.

then finally added a top- level function to push messages onto the queue:

send(Msg) ->
    tinymq:push(?MODULE, {msg, Msg}).

Now this works fine for the first message I send; message dumped to console 
by handle_info; but after that no other pushed messages are dumped.

Have I misunderstood how the tinymq subscribe API works ? Do I have to 
flush queues somewhere ?

TIA

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/2742f9c4-7f4c-40c2-ae72-4b7ffd5729d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to