@@ -345,23 +345,23 @@ impl<const N: usize> Reactor<N> {
345
345
}
346
346
347
347
pub ( crate ) fn register ( & self , fd : RawFd ) -> io:: Result < ( ) > {
348
- self . lock_modify ( |regs| regs. register ( fd) )
348
+ self . modify ( |regs| regs. register ( fd) )
349
349
}
350
350
351
351
pub ( crate ) fn deregister ( & self , fd : RawFd ) -> io:: Result < ( ) > {
352
- self . lock_modify ( |regs| regs. deregister ( fd) )
352
+ self . modify ( |regs| regs. deregister ( fd) )
353
353
}
354
354
355
355
// pub(crate) fn set(&self, fd: RawFd, event: Event, waker: &Waker) -> io::Result<()> {
356
356
// self.lock(|regs| regs.set(fd, event, waker))
357
357
// }
358
358
359
359
pub ( crate ) fn fetch ( & self , fd : RawFd , event : Event ) -> io:: Result < bool > {
360
- self . lock_modify ( |regs| regs. fetch ( fd, event) )
360
+ self . modify ( |regs| regs. fetch ( fd, event) )
361
361
}
362
362
363
363
pub ( crate ) fn fetch_or_set ( & self , fd : RawFd , event : Event , waker : & Waker ) -> io:: Result < bool > {
364
- self . lock_modify ( |regs| {
364
+ self . modify ( |regs| {
365
365
if regs. fetch ( fd, event) ? {
366
366
Ok ( true )
367
367
} else {
@@ -383,7 +383,7 @@ impl<const N: usize> Reactor<N> {
383
383
let mut update = false ;
384
384
385
385
let result = loop {
386
- let max = self . lock_apply ( |inner| {
386
+ let max = self . apply ( |inner| {
387
387
if !update {
388
388
update = true ;
389
389
} else {
@@ -427,7 +427,7 @@ impl<const N: usize> Reactor<N> {
427
427
result
428
428
}
429
429
430
- fn lock_modify < F , R > ( & self , f : F ) -> io:: Result < R >
430
+ fn modify < F , R > ( & self , f : F ) -> io:: Result < R >
431
431
where
432
432
F : FnOnce ( & mut Registrations < N > ) -> io:: Result < R > ,
433
433
{
@@ -447,7 +447,7 @@ impl<const N: usize> Reactor<N> {
447
447
} )
448
448
}
449
449
450
- fn lock_apply < F , R > ( & self , f : F ) -> io:: Result < R >
450
+ fn apply < F , R > ( & self , f : F ) -> io:: Result < R >
451
451
where
452
452
F : FnOnce ( & mut Registrations < N > ) -> io:: Result < R > ,
453
453
{
0 commit comments