[erlang-questions] is this a shell bug?

Robert Raschke rtrlists@REDACTED
Mon Apr 23 14:28:08 CEST 2012


Intriguing. I was unaware of that. Thank you!

On Mon, Apr 23, 2012 at 12:01 PM, Hynek Vychodil <hynek@REDACTED> wrote:

> Doesn't flush() work as well for you?
>
> On Mon, Apr 23, 2012 at 12:23 PM, Robert Raschke
> <rtrlists@REDACTED> wrote:
> > Whenever I tinker with message sending and receiving in the shell, I
> make me
> > this handy small fun (or similar) to ease my life:
> >
> > (erl@REDACTED)1> R = fun () -> receive X -> X after 0 ->
> > no_messages_pending end end.
> > #Fun<erl_eval.20.21881191>
> > (erl@REDACTED)2> self() ! {a, message}.
> > {a,message}
> > (erl@REDACTED)3> R().
> > {a,message}
> > (erl@REDACTED)4> R().
> > no_messages_pending
> > (erl@REDACTED)5>
> >
> >
> > Robby
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120423/92281130/attachment.htm>


More information about the erlang-questions mailing list