跳到主要内容

5 篇文档带有标签「facet:async-and-io」

查看所有标签

Async

Go 没有 async/await,异步由 goroutine、channel 与 context 组合而成;本页说明 errgroup、worker pool、取消与背压的机制,区分异步与并行,并给出 goroutine 泄漏、无缓冲死锁、取消不传播、循环变量捕获四类故障的排查路径。

Async

Java 的异步模型:CompletableFuture 的组合与陷阱、虚拟线程的调度与成本、响应式流的背压,以及执行器、超时与取消的边界。

Async

The event loop and its task queues, Promise states and combinators, async and await sequencing, timers and cancellation, and the worker and backpressure boundaries.

Async

Python 的异步模型:asyncio 事件循环如何调度协程与任务,TaskGroup 如何实现结构化并发,取消、超时与背压的语义边界,to_thread 如何隔离阻塞调用,以及 GIL 之下异步能解决与不能解决什么。

Async

async fn 被编译成惰性的 Future 状态机,执行器轮询、反应器唤醒、Pin 固定地址,取消由 drop 完成;理解这套分工才不会把阻塞调用塞进运行时。