Manuel Albarran

A random notes about Elixir

Process.info

02 Oct 2016 » elixir, meta
Process.info(self)[:messages)
#> []
Process.info(self)[:message_queue_len]
#> 0

send(self, :hello)
Process.info(self)[:messages]
#> [:hello]
Process.info(self)[:message_queue_len]
#> 1

flush
Process.info(self)[:messages]
#> [] 

Another way

Process.info(self, :messages)
#> []
Process.info(self, :message_queue_len)
#> 0

send(self, :hello)
Process.info(self, :messages)
#> [:hello]
Process.info(self, :message_queue_len)
#> 1

flush
Process.info(self, :messages)
#> []