[erlang-questions] Completing the thought (a question about receive)

Donald Steven t6sn7gt@REDACTED
Mon Feb 18 16:55:35 CET 2019

In a receive block, will the code 'thought' be completed before things 
goes 'back' to the beginning of the block, or does another incoming 
message received before the completion of that thought 'interrupt' the 
thought.  If I haven't expressed that clearly, consider:


         {_, ComposerList, StartTime, XCoordinate, _, _, Distance, 
notdone} ->

             some code I want executed
             some code I want executed
             some code I want executed;

         {Base, _, StartTime, _, _, _, done}   ->

             some code I want executed



SO, will the three lines marked "some code I want executed" be executed 
always, or does a closely following message interrup it and send things 
back to the 'receive' (leaving some code perhaps not executed)?

(...trying to find a problem...)



More information about the erlang-questions mailing list