Yicong-Huang commented on code in PR #6522:
URL: https://github.com/apache/texera/pull/6522#discussion_r3608746669


##########
amber/src/main/python/core/models/internal_queue.py:
##########
@@ -74,6 +74,14 @@ def is_empty(self, key=None) -> bool:
     def get(self) -> T:
         return self._queue.get()
 
+    def peek(self) -> Optional[T]:
+        """
+        Peek the element that get() would return next, without removing it.
+
+        :return: Optional[T], the next available element, or None if empty.
+        """
+        return self._queue.peek()

Review Comment:
   the encapsulation intention was to let the internal_queue not peakable (same 
as python Queue interface). Is it possible to solve this issue without exposing 
the underneath internal api?



-- 
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