<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="321389" data-post-id="321389">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="D4no0" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/D4no0/120/33624_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  D4no0
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Indeed, this is a confusing trap for beginners, especially if you come from languages where order of the functions don’t matter, thank God for compiler warnings.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="321389" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-can-go-wrong-with-genservers/62085/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-321389" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="321389"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="321398" data-post-id="321398">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="owenfi" data-post="9" data-topic="62085">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/o/eada6e/48.png" class="avatar"> owenfi:</div>
<blockquote>
<p>I’m a bit lost on that and would love more explanation.</p>
</blockquote>
</aside>
<p>You can read about it here, it’s IMO well-explained: <a href="https://www.openmymind.net/Elixir-A-Little-Beyond-The-Basics-Part-8-genservers/" class="inline-onebox" rel="noopener nofollow ugc">Elixir, A Little Beyond The Basics - Part 8: genservers</a></p>
<p>One very important excerpt about the process messages:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"># send
:hello

 # cast
{:"$gen_cast", :hello}

# call
{ :"$gen_call",
  {#PID&lt;0.110.0&gt;, [:alias | #Reference&lt;0.426212949.4092919813.244647&gt;]},
  :hello
}
</code></pre>
<p><code>GenServer.cast</code> and <code>GenServer.call</code> basically do <code>send</code> messages with an opinionated format. There’s no magic, just stuff that’s handled for you so you have an easier time – that’s all really.</p>
<p>But if you want to start peeking under the hood you have to make sure you either don’t match on these special messages or you do get them but also forward them further, otherwise <code>GenServer.cast</code> and <code>GenServer.call</code> will not work.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="321398" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/what-can-go-wrong-with-genservers/62085/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-321398" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="321398"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>