Tag
A blog post examining the missing post-completion state in Rust's Future trait, discussing how Future::poll panics after returning Poll::Ready and how types like MaybeDone work around it to communicate a future's completed state.
Raymond Chen wraps up his C++ futures library series by explaining std::future and std::shared_future, how they manipulate the underlying 'source', and offers his alternative naming suggestions for the futures library components.
Raymond Chen explores workarounds for creating an immediate on-thread std::future in C++, using std::promise, std::packaged_task, or a deferred std::async that is waited on immediately.
Raymond Chen 解释 C++ std::async 的心智模型,说明 launch 策略的两个维度(立即/延迟、同线程/新线程)中哪些组合是标准允许的,哪些被禁止或由实现决定。
A follow-up blog post in Raymond Chen's C++ futures series explaining the mental model behind std::promise and std::packaged_task, showing how a shared 'source' state is managed via shared_ptr and how packaged_task wraps a promise to store call results for retrieval by a future.
Raymond Chen 的《The Old New Thing》博客深入解析 C++ 标准库中 std::future 背后的内部实现机制,展示了 promise、packaged_task 和 async 共同依赖的底层 source 状态类的心智模型与代码构建过程。
A technical blog post examining the common complaints surrounding async Rust — including function coloring, async drop, Tokio defaultism, and the scoped task trilemma — while exploring where scheduling responsibility should live in the ecosystem.
Polymarket has launched Polymarket Perps, a perpetual futures trading platform offering up to 20x leverage on assets like crypto, stocks, and commodities with deep liquidity and low fees.
Explains the `std::pin::Pin` type in Rust, why pinning is needed for self-referential types like async state machines, and how `Pin` prevents moves while allowing safe mutation.
Explains how `&self` on an async trait method with a `Send` future implicitly requires `Sync` on the implementing type, and offers fixes like switching to `&mut self` or using `Sync` interior mutability.