V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
fallshuang
V2EX  ›  Rust

如何在 rust 里实现一个超级轻量级的协程? (譬如 protothread)

  •  
  •   fallshuang · Dec 9, 2023 · 2713 views
    This topic created in 878 days ago, the information mentioned may be changed or developed.

    Protothreads 是个 纯 C 的超轻量级(不可能有比它更轻量的了)协程实现,100 多行代码。

    https://dunkels.com/adam/pt/

    3 replies    2023-12-11 10:14:31 +08:00
    786375312123
        1
    786375312123  
       Dec 9, 2023
    直接用 async/await 写
    xiaolin97
        2
    xiaolin97  
       Dec 9, 2023
    不想折腾直接拥抱 tokio 生态吧
    araraloren
        3
    araraloren  
       Dec 11, 2023
    a toy?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2547 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:02 · PVG 19:02 · LAX 04:02 · JFK 07:02
    ♥ Do have faith in what you're doing.