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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="julismz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/julismz/120/28368_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  julismz
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for your reply kokolegorille. I think that what you say is like I had before, but the GenServer call is code-blocking. That the reason I’ve settled a Task Async, to avoid the code execution blocking…</p>
<p><strong>Before:</strong><br>
LiveView<br>
GenServer call<br>
Wait 10 seconds…<br>
return the view {:noreply, etc}</p>
<p>The good: PubSub work changing page.<br>
The bad: I can’t render view until the GenServer ends.</p>
<p><strong>Now:</strong><br>
LiveView<br>
TaskAsync Supervised → GenServer call<br>
return the view {:noreply, etc}</p>
<p>The good: View render immediately<br>
The bad: PubSub does not work when change page as the liveview process dies.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261947" 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/pubsub-broadcast-on-a-module-subscribe-on-aonther/50320/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-261947" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261947"
                     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="261948" data-post-id="261948">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="julismz" data-post="12" data-topic="50320">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/julismz/48/28368_2.png" class="avatar"> julismz:</div>
<blockquote>
<p>GenServer call<br>
Wait 10 seconds…</p>
</blockquote>
</aside>
<p>What about GenServer.cast?<br>
And using a GenServer between client and workers?</p>
<p>I am sure what You want is doable, but I am also sure I would not use the Task module.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261948" data-batch-url="/posts/batch_likers">
                        1
                      </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/pubsub-broadcast-on-a-module-subscribe-on-aonther/50320/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-261948" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261948"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="261991" data-post-id="261991">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="julismz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/julismz/120/28368_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  julismz
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Well, I think I get this working with async_nolink/3</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://elixir.hexdocs.pm/1.13/Task.Supervisor.html">
  <header class="source">

      <a href="https://elixir.hexdocs.pm/1.13/Task.Supervisor.html" target="_blank" rel="noopener nofollow ugc">elixir.hexdocs.pm</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://elixir.hexdocs.pm/1.13/Task.Supervisor.html" target="_blank" rel="noopener nofollow ugc">Task.Supervisor — Elixir v1.13.4</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Next challenge is to place the code on some plug to avoid repeating code across all the project <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261991" 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/pubsub-broadcast-on-a-module-subscribe-on-aonther/50320/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-261991" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261991"
                     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>