mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 09:37:46 +08:00
Correct a comment and clean up code that listens for universal notifier
changes
This commit is contained in:
parent
a0e6d4375a
commit
30cfb3e795
|
@ -184,19 +184,16 @@ static wint_t readb()
|
|||
}
|
||||
}
|
||||
|
||||
/* Notifiers either poll or have an fd, not both. So at most one of these branches will be taken. */
|
||||
if (notifier.poll())
|
||||
{
|
||||
env_universal_barrier();
|
||||
}
|
||||
|
||||
/* Check to see if we want a barrier */
|
||||
bool barrier_from_poll = notifier.poll();
|
||||
bool barrier_from_readability = false;
|
||||
if (notifier_fd > 0 && FD_ISSET(notifier_fd, &fdset))
|
||||
{
|
||||
bool notified = notifier.notification_fd_became_readable(notifier_fd);
|
||||
if (notified)
|
||||
{
|
||||
env_universal_barrier();
|
||||
}
|
||||
barrier_from_readability = notifier.notification_fd_became_readable(notifier_fd);
|
||||
}
|
||||
if (barrier_from_poll || barrier_from_readability)
|
||||
{
|
||||
env_universal_barrier();
|
||||
}
|
||||
|
||||
if (ioport > 0 && FD_ISSET(ioport, &fdset))
|
||||
|
|
Loading…
Reference in New Issue
Block a user