Skip to contentSkip to content

Futures in Rust and IT Exams

  • Contact Us
Close Button

What is a future? – Futures in RustWhat is a future? – Futures in Rust

2023-10-022023-10-02| Christine WichmanChristine Wichman| 0 Comment| 03:44

In Chapter 5, we covered one of the most popular ways of modeling concurrency in a programming language: fibers/green threads. Fibers/green threads are an example of stackful coroutines. The other

Read MoreRead More

Finishing thoughts – Creating Our Own FibersFinishing thoughts – Creating Our Own Fibers

2023-09-262023-09-26| Christine WichmanChristine Wichman| 0 Comment| 03:41

I want to round off this chapter by pointing out some of the advantages and disadvantages of this approach, which we went through in Chapter 2, since we now have

Read MoreRead More

Guard, skip, and switch functions – Creating Our Own Fibers-2Guard, skip, and switch functions – Creating Our Own Fibers-2

2023-08-132023-08-13| Christine WichmanChristine Wichman| 0 Comment| 03:40

These are hex numbers indicating the offset from the memory pointer to which we want to read/write. I wrote down the base 10 numbers as comments, so as you can

Read MoreRead More

Guard, skip, and switch functions – Creating Our Own Fibers-1Guard, skip, and switch functions – Creating Our Own Fibers-1

2023-07-062023-07-06| Christine WichmanChristine Wichman| 0 Comment| 03:39

There are a few functions we’ve referred to that are really important for our Runtime to actually work. Fortunately, all but one of them are extremely simple to understand. We’ll

Read MoreRead More

WHY DO WE NEED THE SKIP FUNCTION? – Creating Our Own FibersWHY DO WE NEED THE SKIP FUNCTION? – Creating Our Own Fibers

2023-05-222023-05-22| Christine WichmanChristine Wichman| 0 Comment| 03:29

Note I promised to point out where we close the impl Runtime block, and we do that after the spawn function. The upcoming functions are “free” functions that don’t belong

Read MoreRead More

MORE INLINE ASSEMBLY – Creating Our Own FibersMORE INLINE ASSEMBLY – Creating Our Own Fibers

2023-04-082023-04-08| Christine WichmanChristine Wichman| 0 Comment| 03:28

We need to explain the new concepts we introduced here. The assembly calls the function switch (the function is tagged with #[no_mangle] so we can call it by name). The

Read MoreRead More

NOTE – Creating Our Own FibersNOTE – Creating Our Own Fibers

2023-02-192023-02-19| Christine WichmanChristine Wichman| 0 Comment| 03:28

yield is a reserved word in Rust, so we can’t name our function that. If that was not the case, it would be my preferred name for it over the

Read MoreRead More

Implementing the runtime – Creating Our Own FibersImplementing the runtime – Creating Our Own Fibers

2023-01-292023-01-29| Christine WichmanChristine Wichman| 0 Comment| 03:27

Note The registers we save in our ThreadContext struct are the registers that are marked as callee saved in Figure 5.1. We need to save these since the ABI states

Read MoreRead More

NAKED FUNCTIONS – Creating Our Own FibersNAKED FUNCTIONS – Creating Our Own Fibers

2022-12-262022-12-26| Christine WichmanChristine Wichman| 0 Comment| 03:26

If you remember when we talked about the operating system ABI and calling conventions earlier, you probably remember that each architecture and OS have different requirements. This is especially important

Read MoreRead More

Implementing our own fibers – Creating Our Own FibersImplementing our own fibers – Creating Our Own Fibers

2022-11-172022-11-17| Christine WichmanChristine Wichman| 0 Comment| 03:25

Before we start, I want to make sure you understand that the code we write is quite unsafe and is not a “best practice” when writing Rust. I want to

Read MoreRead More

Posts pagination

Previous 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