Vendor dependencies for 0.3.0 release

This commit is contained in:
2025-09-27 10:29:08 -05:00
parent 0c8d39d483
commit 82ab7f317b
26803 changed files with 16134934 additions and 0 deletions

38
vendor/polling/tests/notify.rs vendored Normal file
View File

@@ -0,0 +1,38 @@
use std::io;
use std::thread;
use std::time::Duration;
use easy_parallel::Parallel;
use polling::Events;
use polling::Poller;
#[test]
fn simple() -> io::Result<()> {
let poller = Poller::new()?;
let mut events = Events::new();
for _ in 0..10 {
poller.notify()?;
poller.wait(&mut events, None)?;
assert!(events.is_empty());
}
Ok(())
}
#[test]
fn concurrent() -> io::Result<()> {
let poller = Poller::new()?;
let mut events = Events::new();
for _ in 0..2 {
Parallel::new()
.add(|| {
thread::sleep(Duration::from_secs(0));
poller.notify().unwrap();
})
.finish(|| poller.wait(&mut events, None).unwrap());
}
Ok(())
}