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.
1 parent 41776f3 commit 4c19fbdCopy full SHA for 4c19fbd
crates/symmetric_executor/src/lib.rs
@@ -48,7 +48,16 @@ impl symmetric_executor::GuestEventGenerator for EventGenerator {
48
}
49
50
fn subscribe(&self) -> symmetric_executor::EventSubscription {
51
- todo!()
+ let event_fd = unsafe { libc::eventfd(0, libc::EFD_NONBLOCK) };
52
+ self.0.lock().unwrap().waiting.push(event_fd);
53
+ symmetric_executor::EventSubscription::new(EventSubscription {
54
+ inner: EventType::Triggered {
55
+ last_counter: AtomicU32::new(0),
56
+ event_fd,
57
+ object: Arc::clone(&self.0),
58
+ },
59
+ callback: None,
60
+ })
61
62
63
fn activate(&self) -> () {
0 commit comments