Skip to content

Commit

Permalink
update original
Browse files Browse the repository at this point in the history
  • Loading branch information
funkill committed Nov 25, 2024
1 parent a6aeccd commit 385e67a
Show file tree
Hide file tree
Showing 10 changed files with 292 additions and 119 deletions.
48 changes: 0 additions & 48 deletions async-book/src/07_workarounds/02_err_in_async_blocks.md

This file was deleted.

9 changes: 4 additions & 5 deletions async-book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

[Introduction](intro.md)

- [Navigation]()
- [By topic]()
- [Navigation](navigation/intro.md)
- [By topic](navigation/topics.md)
- [FAQs]()
- [Index]()
- [Index](navigation/index.md)

# Part 1: guide

- [Introduction](part-guide/intro.md)
- [Concurrent programming](part-guide/concurrency.md)
- [Async and await](part-guide/async-await.md)
- [Advanced async/await topics](part-guide/adv-async-await.md)
- [More async/await topics](part-guide/more-async-await.md)
- [IO and issues with blocking](part-guide/io.md)
- [Concurrency primitives](part-guide/concurrency-primitives.md)
- [Channels, locking, and synchronization](part-guide/sync.md)
Expand Down Expand Up @@ -62,7 +62,6 @@
- [TODO: Cancellation and Timeouts]()
- [TODO: `FuturesUnordered`]()
- [Workarounds to Know and Love](07_workarounds/01_chapter.md)
- [`?` in `async` Blocks](07_workarounds/02_err_in_async_blocks.md)
- [`Send` Approximation](07_workarounds/03_send_approximation.md)
- [Recursion](07_workarounds/04_recursion.md)
- [`async` in Traits](07_workarounds/05_async_in_traits.md)
Expand Down
76 changes: 76 additions & 0 deletions async-book/src/navigation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Index



- Async/`async`
- [blocks](../part-guide/more-async-await.md#async-blocks)
- [closures](../part-guide/more-async-await.md#async-closures)
- [functions](../part-guide/async-await.md#async-functions)
- [traits](../part-guide/more-async-await.md#async-traits)
- [c.f., threads](../part-guide/concurrency.md#async-programming)
- [`await`](../part-guide/async-await.md#await)



- [Blocking](../part-guide/more-async-await.md#blocking-and-cancellation)
- [IO](../part-guide/more-async-await.md#blocking-io)



- [Cancellation](../part-guide/more-async-await.md#cancellation)
- [`CancellationToken`](../part-guide/more-async-await.md#cancellation)
- [Concurrency](../part-guide/concurrency.md)
- [c.f., parallelism](../part-guide/concurrency.md#concurrency-and-parallelism)



- [Executor](../part-guide/async-await.md#the-runtime)



- [Futures](../part-guide/async-await.md#futures-and-tasks)
- `Future` trait



- IO
- [Blocking](../part-guide/more-async-await.md#blocking-io)



- [Joining tasks](../part-guide/async-await.md#joining-tasks)
- [`JoinHandle`](../part-guide/async-await.md#joinhandle)
- [`abort`](../part-guide/more-async-await.md#cancellation)



- Multitasking
- [Cooperative](../part-guide/concurrency.md#async-programming)
- [Pre-emptive](../part-guide/concurrency.md#processes-and-threads)



- [Parallelism](../part-guide/concurrency.md#concurrency-and-parallelism)
- [c.f., concurrency](../part-guide/concurrency.md#concurrency-and-parallelism)



- [Reactor](../part-guide/async-await.md#the-runtime)
- [Runtimes](../part-guide/async-await.md#the-runtime)



- [Scheduler](../part-guide/async-await.md#the-runtime)
- [Spawning tasks](../part-guide/async-await.md#spawning-tasks)



- [Tasks](../part-guide/async-await.md#futures-and-tasks)
- [Spawning](../part-guide/async-await.md#spawning-tasks)
- Testing
- [Unit tests](../part-guide/more-async-await.md#unit-tests)
- [Threads](../part-guide/concurrency.md#processes-and-threads)
- [Tokio](../part-guide/async-await.md#the-runtime)
- Traits
- [async](../part-guide/more-async-await.md#async-traits)
- `Future`
7 changes: 7 additions & 0 deletions async-book/src/navigation/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Navigation

TODO Intro to navigation

- [By topic](topics.md)
- [FAQs]()
- [Index](index.md)
20 changes: 20 additions & 0 deletions async-book/src/navigation/topics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Topic index

## Concurrency and parallelism

- [Introduction](../part-guide/concurrency.md#concurrency-and-parallelism)
- [Running async tasks in parallel using `spawn`](../part-guide/async-await.md#spawning-tasks)

## Correctness and safety

- Cancellation
- [Introduction](../part-guide/more-async-await.md#cancellation)

## Performance

- Blocking
- [Introduction](../part-guide/more-async-await.md#blocking-and-cancellation)

## Testing

- [Unit test syntax](../part-guide/more-async-await.md#unit-tests)
65 changes: 0 additions & 65 deletions async-book/src/part-guide/adv-async-await.md

This file was deleted.

3 changes: 3 additions & 0 deletions async-book/src/part-guide/concurrency-primitives.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
- different versions in different runtimes/other crates
- focus on the Tokio versions

From [comment](https://github.com/rust-lang/async-book/pull/230#discussion_r1829351497): A framing I've started using is that tasks are not the async/await form of threads; it's more accurate to think of them as parallelizable futures. This framing does not match Tokio and async-std's current task design; but both also have trouble propagating cancellation. See parallel_future and tasks are the wrong abstraction for more.


## Join

- Tokio/futures-rs join macro
Expand Down
2 changes: 1 addition & 1 deletion async-book/src/part-guide/dtors.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Cancellation

- How it happens (recap of adv-async-await.md)
- How it happens (recap of more-async-await.md)
- drop a future
- cancellation token
- abort functions
Expand Down
Loading

0 comments on commit 385e67a

Please sign in to comment.