[erlang-questions] concurrency question
Fri Sep 30 03:25:07 CEST 2016
I have a program that does the following:
- start gen_event, naming it "dispatcher"
- spawn a process
- send 60 message to process then a stop message
The spawned process outputs a line to stdout for
each message recieved, and after 40 or so messages,
the spawned process calls gen_event:notify(dispatcher, ...).
This has the obvious bug that when the event is fired, the
dispatcher is long gone.
When I run this from the command line like this:
erl -run simulation -run init stop
the spawned process does not print any error message to
the console when it crashes.
But when I run it from inside the interpreter,
** exception error: no such process or port
(which is gen_event saying hey, I can't notify the Pid with that name
because it's gone.)
Why don't I get that error output when I run from the console?
Blogging at markbucciarelli.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions