Skip to contentSkip to content

Futures in Rust and IT Exams

  • Contact Us
Close Button

Creating coroutines – Coroutines and async/awaitCreating coroutines – Coroutines and async/await

2024-09-032024-09-03| Christine WichmanChristine Wichman| 0 Comment| 03:57

We’ll continue to build our knowledge and understanding from the ground up. The first thing we’ll do is create a task that we can stop and resume by modeling it

Read MoreRead More

Do all futures have to be lazy? – Coroutines and async/awaitDo all futures have to be lazy? – Coroutines and async/await

2024-08-162024-08-16| Christine WichmanChristine Wichman| 0 Comment| 03:55

A lazy future is one where no work happens before it’s polled the first time. This will come up a lot if you read about futures in Rust, and since

Read MoreRead More

NOTE – Coroutines and async/awaitNOTE – Coroutines and async/await

2024-07-212024-07-21| Christine WichmanChristine Wichman| 0 Comment| 03:55

When creating HttpGetFuture, we don’t actually do anything related to the GET request, which means that the call to Http::get returns immediately with just a simple data structure. In contrast

Read MoreRead More

HTTP module – Coroutines and async/awaitHTTP module – Coroutines and async/await

2024-06-242024-06-24| Christine WichmanChristine Wichman| 0 Comment| 03:53

In this module, we’ll implement a very simple HTTP client. This client can only make GET requests to our delayserver since we just use this as a representation of a

Read MoreRead More

An example of hand-written coroutines – Coroutines and async/awaitAn example of hand-written coroutines – Coroutines and async/await

2024-05-182024-05-18| Christine WichmanChristine Wichman| 0 Comment| 03:51

The example we’ll use going forward is a simplified version of Rust’s asynchronous model. We’ll create and implement the following: So, to actually demystify coroutines, futures, and async/await, we will

Read MoreRead More

STACKLESS COROUTINES OR JUST COROUTINES? – Coroutines and async/awaitSTACKLESS COROUTINES OR JUST COROUTINES? – Coroutines and async/await

2024-04-142024-04-14| Christine WichmanChristine Wichman| 0 Comment| 03:50

Most often you’ll see stackless coroutines simply referred to as coroutines. To try to keep some consistency (you remember I don’t like to introduce terms that mean different things based

Read MoreRead More

Introduction to stackless coroutines – Coroutines and async/awaitIntroduction to stackless coroutines – Coroutines and async/await

2024-03-232024-03-23| Christine WichmanChristine Wichman| 0 Comment| 03:50

Now that you’ve gotten a brief introduction to Rust’s async model, it’s time to take a look at how this fits in the context of everything else we’ve covered in

Read MoreRead More

What the Rust language and standard library take care of – Futures in RustWhat the Rust language and standard library take care of – Futures in Rust

2024-02-202024-02-20| Christine WichmanChristine Wichman| 0 Comment| 03:49

Rust only provides what’s necessary to model asynchronous operations in the language. Basically, it provides the following: That’s really what Rust’s standard library does. As you see there is no

Read MoreRead More

A mental model of an async runtime – Futures in RustA mental model of an async runtime – Futures in Rust

2024-01-252024-01-25| Christine WichmanChristine Wichman| 0 Comment| 03:47

I find it easier to reason about how futures work by creating a high-level mental model we can use. To do that, I have to introduce the concept of a

Read MoreRead More

Non-leaf futures – Futures in RustNon-leaf futures – Futures in Rust

2023-12-222023-12-22| Christine WichmanChristine Wichman| 0 Comment| 03:46

Leaf futures Runtimes create leaf futures, which represent a resource such as a socket. This is an example of a leaf future:let mut stream = tokio::net::TcpStream::connect(“127.0.0.1:3000”); Operations on these resources,

Read MoreRead More

Posts pagination

1 2 3 Next

Search

Archives

  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • May 2023
  • April 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021

Meta

  • Log in

Categories

  • Creating coroutines
  • Do all futures have to be lazy?
  • Exams of IT
  • Guard, skip, and switch functions
  • IT Certification Exams
  • Non-leaf futures
  • Running our example
  • What does the stack look like?

Dropdown Categories

Tag Cloud



Terms and conditions | Copyright complaints | Rights and Clearance | Cookie Preferences

Scroll Up