Comments (6)
Also might be related as I also get on one test
thread 'python' panicked at 'assertion failed: `(left == right)`
left: `4`,
right: `0`', /home/mzhiburt/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/io.rs:1700:13
from futures-lite.
And ongoing question, if you don't mind.
Is it safe to do the following.
future::poll_once(self.inner.read(buf)).await
Where inner is a BufRead<async_file::File>
;
Because it just don't work, the buffer is never read 😞
When I use std::fs::File
with O_NONBLOCK
it works good.
from futures-lite.
Testing it in a different project and read_line
works fine. ...
from futures-lite.
I can state that it sometimes fails and sometimes not.
p.read_line(&mut msg).await.unwrap(); // works
***
p.read_line(&mut msg).await.unwrap(); // panic on assert_debug
from futures-lite.
So moving from async-fs
to async-io
cause a different issue on the same code
thread 'python' panicked at 'assertion failed: buf.is_empty()', /home/mzhiburt/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-lite-1.12.0/src/io.rs:1699:13
from futures-lite.
Running it in --release
to disable debug_asserts drops 6 characters where were available if we would read it in a sync mode.
from futures-lite.
Related Issues (20)
- support fuse in FutureExt HOT 3
- add now_or_never HOT 3
- future::Either or something similar? HOT 2
- Drop `future::{ready,pending}` at the next bigger release
- stream::Race never finishes HOT 4
- Accept async functions for `StreamExt::map()` and others HOT 3
- Add `dedupe()` to `StreamExt` HOT 2
- Method for creating a stream from a future HOT 1
- parking vs std::thread::park HOT 1
- `select!` & `select_biased!` as in `futures-util` HOT 9
- Panic in read_line? HOT 1
- msrv 1.48 broken HOT 6
- Remove the waker-fn dependency
- map_ok from TryStreamExt and buffered from StreamExt HOT 2
- Possible deadlock when using `smol::io::split`
- Recreating concurrent futures combinators in smol HOT 2
- Add a trait for abstracing over executors HOT 12
- `or` but for different output types HOT 2
- Add `StreamExt::take_until` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from futures-lite.