Skip to content

Commit

Permalink
[misc] enhance TaskRunner Process
Browse files Browse the repository at this point in the history
  • Loading branch information
Irving-cl committed Feb 7, 2025
1 parent b555318 commit 0105485
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/task_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ void TaskRunner::Update(MainloopContext &aMainloop)

void TaskRunner::Process(const MainloopContext &aMainloop)
{
OTBR_UNUSED_VARIABLE(aMainloop);

ssize_t rval;

VerifyOrExit(FD_ISSET(mEventFd[kRead], &aMainloop.mReadFdSet));

// Read any data in the pipe.
do
{
Expand All @@ -125,7 +125,9 @@ void TaskRunner::Process(const MainloopContext &aMainloop)
// Critical error happens, simply die.
VerifyOrDie(errno == EAGAIN || errno == EWOULDBLOCK, strerror(errno));

exit:
PopTasks();
return;
}

TaskRunner::TaskId TaskRunner::PushTask(Milliseconds aDelay, Task<void> aTask)
Expand Down

0 comments on commit 0105485

Please sign in to comment.