mirror of
https://github.com/joleuger/vuinputd.git
synced 2026-07-17 16:36:03 +00:00
Fix 100% CPU bug
This commit is contained in:
parent
e6c38be172
commit
6eb5a2985a
1 changed files with 2 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ impl EvdevWriteWatcher {
|
|||
|
||||
self.epoll.add(
|
||||
&vuinput_state.file,
|
||||
EpollEvent::new(EpollFlags::EPOLLIN, fh),
|
||||
EpollEvent::new(EpollFlags::EPOLLIN | EpollFlags::EPOLLET, fh),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ fn evdev_write_watch_loop(shutdown: Arc<AtomicBool>, epoll: Arc<Epoll>) {
|
|||
if let Ok(state) = state {
|
||||
let mut state = state.lock().unwrap();
|
||||
let handle = state.poll.take_waiters();
|
||||
if let Some(mut handle)= handle {
|
||||
if let Some(mut handle) = handle {
|
||||
handle.notify();
|
||||
}
|
||||
state.poll.pollphase = PollPhase::Readable;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue