We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ed20c44 + 047c3db commit 8cb611cCopy full SHA for 8cb611c
tests/driver.rs
@@ -37,3 +37,22 @@ fn timeout() {
37
.unwrap_err();
38
assert_eq!(err.kind(), io::ErrorKind::TimedOut);
39
}
40
+
41
+#[test]
42
+fn register_multiple() {
43
+ const TASK_LEN: usize = 5;
44
45
+ let mut driver = Proactor::new().unwrap();
46
47
+ let file = File::open("Cargo.toml").unwrap();
48
+ driver.attach(file.as_raw_fd()).unwrap();
49
50
+ for _i in 0..TASK_LEN {
51
+ driver.push(ReadAt::new(file.as_raw_fd(), 0, Vec::with_capacity(1024)));
52
+ }
53
54
+ let mut entries = ArrayVec::<Entry, TASK_LEN>::new();
55
+ while entries.len() < TASK_LEN {
56
+ driver.poll(None, &mut entries).unwrap();
57
58
+}
0 commit comments