wangchdo commented on PR #17222:
URL: https://github.com/apache/nuttx/pull/17222#issuecomment-3426702317

   > I think this needs to be tested with more than just CI. It is a code 
change that needs runtime testing, not just building.
   > 
   > 
   > 
   > Also, why would we want to wake up a sleeping task before its timeout? 
Maybe I'm unfamiliar with the semantics of sleeping, but isn't it a requirement 
that the caller is never woken up prior to the timeout? Only on or after?
   
   Sleep and wakeup sometimes should be in pair in terms of syncronization
   
   For example task1 can not move on because some condition is not met and 
choose to sleep for a while in the simplest case, but before timeout task2 
which has lower priority than task1 met the condition, then it can wakeup task1 
to let task1 preempt it
   
   
   sleep/wakeup is simpler and lighter than mutex or semaphore 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to