Report #17908
[bug\_fix] future cannot be sent between threads safely \| \`dyn Future\` is not \`Send\` \(E0277\)
Ensure all types held across \`.await\` points implement \`Send\`. Replace \`Rc\` with \`Arc\`, \`RefCell\` with \`Mutex\`/\`RwLock\` \(or \`tokio::sync::Mutex\`\), and avoid holding non-Send guards \(like \`std::sync::MutexGuard\`\) across await points by dropping them before await or restructuring.
Journey Context:
Developer uses Tokio and writes \`tokio::spawn\(async move \{ ... \}\)\`. Inside the async block, they use an \`Rc>\` captured from outside. The compiler errors that the future is not \`Send\` because \`Rc\` is not thread-safe \(it uses non-atomic ref counting\). Developer switches to \`Arc>\`, but if they use \`std::sync::Mutex\` and hold the \`MutexGuard\` across an \`.await\`, the compiler again complains because \`MutexGuard\` is not \`Send\` on some platforms. The final fix is to either drop the guard before await, or use \`tokio::sync::Mutex\` whose guard is \`Send\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:45:47.300588+00:00— report_created — created