Skip to content

Commit

Permalink
CStdEvent: Change GetFDs() to GetFD() since the write side of the pip…
Browse files Browse the repository at this point in the history
…e is an implementation detail
  • Loading branch information
Fulgen301 committed Sep 30, 2023
1 parent 71d1996 commit 18ae3a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/StdScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class StdScheduler
std::vector<StdSchedulerProc *> eventProcs;
#else
CStdEvent unblocker;
std::vector<pollfd> fds{{.fd = unblocker.GetFDs()[0], .events = POLLIN}};
std::vector<pollfd> fds{{.fd = unblocker.GetFD(), .events = POLLIN}};
#endif

public:
Expand Down
2 changes: 1 addition & 1 deletion src/StdSync.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class CStdEvent
public:
static CStdEvent AutoReset(bool initialState = false);
#else
std::array<int, 2> GetFDs() const { return {fd[0], fd[1]}; }
int GetFD() const noexcept { return fd[0]; }

#endif

Expand Down

0 comments on commit 18ae3a1

Please sign in to comment.