advance/async/async-await #837
Replies: 11 comments 5 replies
-
越来越复杂了呀!尤其和生命周期混在一起之后🥺 |
Beta Was this translation helpful? Give feedback.
-
导入模块 |
Beta Was this translation helpful? Give feedback.
-
这节讲的感觉有点粗啊 |
Beta Was this translation helpful? Give feedback.
-
while let Some(item) = stream.try_next().await? 这里的问号?是啥啊? 这语言语法真的太难了。。。。 |
Beta Was this translation helpful? Give feedback.
-
一个参数的类型要写这么长 mut stream: Pin<&mut dyn Stream<Item = Result<u8, io::Error>>> |
Beta Was this translation helpful? Give feedback.
-
方法入参定义也是支持这么写的吗?mut在变量前: |
Beta Was this translation helpful? Give feedback.
-
越来越复杂了,从async入门第一节开始,我得看好久才能勉强似乎看明白,对着示例敲,搞不定的问ai,这块以后要是用到了只能说道阻且长长长长长啊 |
Beta Was this translation helpful? Give feedback.
-
建议最后一个例子了最好把jump_n_times和report_n_jumps换成什么调用标准库函数的操作。我一开始以为这两个函数是标准库里的函数,还在网上查半天找不到,然后才反应过来应该是自定义的函数 |
Beta Was this translation helpful? Give feedback.
-
没太看懂这一句话是什么意思:意味着 async fn 函数返回的 Future 必须满足以下条件: 当 x 依然有效时, 该 Future 就必须继续等待( .await ), |
Beta Was this translation helpful? Give feedback.
-
有意思,现在所有的东西都综合起来了,要细想 |
Beta Was this translation helpful? Give feedback.
-
没看明白,Stream流不是针对单个资源的吗?比如文件流、音视频流、网络数据流,这种流对顺序是有要求的,需要串行处理才对呀,没法并行吧。 对于独立的单个事件、客户端请求、DB这种确实是可以并发执行,这里的Stream是指对这些场景的抽象?把这些抽象成流进行处理吗?emmm,看不懂了....😂😂 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
advance/async/async-await
https://course.rs/advance/async/async-await.html
Beta Was this translation helpful? Give feedback.
All reactions