philipnee opened a new pull request, #14118:
URL: https://github.com/apache/kafka/pull/14118

   Continuation of https://github.com/apache/kafka/pull/13490.  I closed the 
original one due to rebase difficulties.
   
   **Summary
   Implemented wakeup() mechanism using a WakeupTrigger class to store the 
pending wakeup item, and when wakeup() is invoked, it checks whether there's an 
active task or a wakeup task.  
   - If there's an active task: the task will be completed exceptionally and 
the atomic reference will be freed up.
   - If there an wakedup task, which means wakeup() was invoked before a 
blocking call was issued.  Therefore, the current task will be completed 
exceptionally immediately.
   
   This PR also addressed minor issues such is:
   1. Throwing WakeupException at the right place: As wakeups are thrown by 
completing an active future exceptionally.  The WakeupException is wrapped 
inside of the ExecutionException.
   2. mockConstruction is a thread-lock mock; therefore, we need to free up the 
reference before completing the test. Otherwise, other tests will continue 
using the thread-lock mock.


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to