formatting
This commit is contained in:
@@ -488,9 +488,12 @@ difficult to understand. If I hadn't written it myself I would probably feel
|
||||
the same. You can always go back and read the book which explains it later.</p>
|
||||
<h3><a class="header" href="#callback-based-approaches" id="callback-based-approaches">Callback based approaches</a></h3>
|
||||
<p>You probably already know what we're going to talk about in the next paragraphs
|
||||
from Javascript which I assume most know. If your exposure to Javascript has
|
||||
given you any sorts of PTSD earlier in life, close your eyes now and scroll down
|
||||
for 2-3 seconds. You'll find a link there that takes you to safety.</p>
|
||||
from Javascript which I assume most know. </p>
|
||||
<blockquote>
|
||||
<p>If your exposure to Javascript has given you any sorts of PTSD earlier in life,
|
||||
close your eyes now and scroll down for 2-3 seconds. You'll find a link there
|
||||
that takes you to safety.</p>
|
||||
</blockquote>
|
||||
<p>The whole idea behind a callback based approach is to save a pointer to a set of
|
||||
instructions we want to run later. We can save that pointer on the stack before
|
||||
we yield control to the runtime, or in some sort of collection as we do below.</p>
|
||||
@@ -647,7 +650,10 @@ promises are <em>eagerly</em> evaluated. That means that once it's created, it s
|
||||
running a task. Rusts Futures on the other hand is <em>lazily</em> evaluated. They
|
||||
need to be polled once before they do any work. You'll see in a moment.</p>
|
||||
</blockquote>
|
||||
|
||||
<br />
|
||||
<div style="text-align: center; padding-top: 2em;">
|
||||
<a href="/1_futures_in_rust.html" style="background: red; color: white; padding:2em 2em 2em 2em; font-size: 1.2em;"><strong>PANIC BUTTON (next chapter)</strong></a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<nav class="nav-wrapper" aria-label="Page navigation">
|
||||
|
||||
Reference in New Issue
Block a user