🌐
Docs
docs.rs › tokio › latest › tokio › sync › mpsc › index.html
tokio::sync::mpsc - Rust
A multi-producer, single-consumer queue for sending values between asynchronous tasks.
🌐
Rust-lang
users.rust-lang.org › help
Axum / tokio shared state channel confusion - help - The Rust ...
November 13, 2021 - I seem to have a conflict between sharing state in Axum, and using a tokio::sync channel rather than a std:sync channel. Tokio says I should be using a tokio::sync channel to communicate between synchronous and asynchronous code ( I understand because it's wrong to block in sync code ). However ...
🌐
Reddit
reddit.com › r/rust › tokio's axum web framework - not new, but new to me
r/rust on Reddit: Tokio's Axum web framework - not new, but new to me
January 22, 2022 - 148 votes, 33 comments. 279K subscribers in the rust community. A place for all things related to the Rust programming language—an open-source…
🌐
Tokio
tokio.rs › tokio › tutorial › channels
Channels | Tokio - An asynchronous Rust runtime
Tokio is a runtime for writing reliable asynchronous applications with Rust. It provides async I/O, networking, scheduling, timers, and more.
🌐
Docs
docs.rs › tokio › latest › tokio › sync › mpsc › fn.channel.html
channel in tokio::sync::mpsc - Rust
Creates a bounded mpsc channel for communicating between asynchronous tasks with backpressure.
🌐
GitHub
github.com › tokio-rs › axum
GitHub - tokio-rs/axum: Ergonomic and modular web framework built ...
Ergonomic and modular web framework built with Tokio, Tower, and Hyper - tokio-rs/axum
Starred by 19,5 mil users
Forked by 1,1 mil users
Languages: Rust
🌐
Tokio
tokio.rs › blog › 2023-11-27-announcing-axum-0-7-0
Announcing axum 0.7.0 | Tokio - An asynchronous Rust runtime
Tokio is a runtime for writing reliable asynchronous applications with Rust. It provides async I/O, networking, scheduling, timers, and more.
🌐
Stack Overflow
stackoverflow.com › questions › 61168507 › wrapping-blocking-mpsc-in-async-rust-tokio
Wrapping blocking mpsc in async Rust (Tokio) - Stack Overflow

I've posted a separate thread on a rust-lang community and got an answer there.

std::sync::mpsc::channel can be swapped to tokio::sync::mpsc::unbounded_channel, which has a non-async send method. It solves the issue.

Answer from Kirill Dubovikov on stackoverflow.com
🌐
Docs
docs.rs › axum › latest › axum
axum - Rust
axum is a web application framework that focuses on ergonomics and modularity.
🌐
GitHub
github.com › philschmid › axum-tokio-mpsc
GitHub - philschmid/axum-tokio-mpsc
Contribute to philschmid/axum-tokio-mpsc development by creating an account on GitHub.
Author: philschmid
🌐
Tokio
tokio.rs › blog › 2021-07-announcing-axum
Announcing Axum | Tokio - An asynchronous Rust runtime
Tokio is a runtime for writing reliable asynchronous applications with Rust. It provides async I/O, networking, scheduling, timers, and more.
🌐
Tokio
tokio.rs › blog › 2019-10-scheduler
Making the Tokio scheduler 10x faster | Tokio - An asynchronous ...
Tokio is a runtime for writing reliable asynchronous applications with Rust. It provides async I/O, networking, scheduling, timers, and more.
🌐
GitHub
github.com › tokio-rs › axum › discussions › 1159
Question: Multiple concurrent writes to a SplitSink · tokio-rs/axum ...
Following from the websocket chat example provided, we are able to receive messages and send messages independent of each other. My currently use-case would need to take this a step further, where ...
Author: tokio-rs
🌐
Understand Axum
rust-api.dev › docs › part-1 › tokio-hyper-axum
Understand Axum | rust-api.dev
May 1, 2021 - In this chapter you will acquire ... of the Axum, Tower and Hyper crates, these are the libraries underlying our application server. Your will learn how to compose middleware layers to add cross-cutting features to your API endpoints. ... Our web application will be completely based on the tokio.rs family ...
🌐
Medium
medium.com › learning-rust › hello-world-server-8ad299d36cf5
Hello World server- Rust, Tokio & Axum | Learning Rust
December 19, 2023 - Let’s take the first steps to Build a Dockerized RESTful API application in Rust. We’ll start with cargo, Tokio & Axum; then let’s Dockerize our web server.
🌐
GitHub
github.com › tokio-rs › axum › discussions › 604
confused about the websocket/chat example model · tokio-rs/axum ...

Does the chat example help https://github.com/tokio-rs/axum/blob/main/examples/chat/src/main.rs?

Author: tokio-rs
🌐
Stack Overflow
stackoverflow.com › questions › 75756941 › is-axum-with-tokio-disabled-still-asynchronous
rust - Is Axum, with Tokio disabled, still asynchronous? - Stack ...

A function is asynchronous if it is defined as such (async keyword) or returns a Future with the former more or less being syntax sugar for the latter, tokio is merely a runtime to run futures for you (it polls them until they are finished), it's presence is orthogonal to something being asynchronous.

Answer from cafce25 on stackoverflow.com
🌐
GitHub
github.com › tokio-rs › axum › discussions › 1911
Is State cloned for each request? · tokio-rs/axum · Discussion #1911

Yes the state is cloned for each request. Otherwise you wouldn't be able to extract an owned state.

Author: tokio-rs
🌐
Reddit
reddit.com › r/rust › tachyonix: a very fast mpsc async bounded channel
r/rust on Reddit: Tachyonix: a very fast MPSC async bounded channel

Looks great, thank you for releasing it as a standalone crate! I'm happy to see an in-depth discussion of the trade-offs between various implementations.

Does it use fences or inline assembly for synchronization? I'm asking because they usually cause false positives on Thread Sanitizer, which is my go-to tool for testing concurrency because you can run entire real-world programs with it with reasonable performance (unlike loom or miri).