Skip to content

Commit cbe111c

Browse files
committed
* UNIX: Refactoring of coroutine cancellation and completion logic
1 parent fa0ccab commit cbe111c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_async_API.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,11 @@ typedef enum {
743743
ZEND_ASYNC_WAKER_RESULT
744744
} ZEND_ASYNC_WAKER_STATUS;
745745

746+
/**
747+
* Condition that is TRUE if the coroutine is in the queue
748+
*/
749+
#define ZEND_ASYNC_WAKER_IN_QUEUE(waker) (waker != NULL && ((waker)->status == ZEND_ASYNC_WAKER_QUEUED || waker->status == ZEND_ASYNC_WAKER_IGNORED))
750+
746751
struct _zend_async_waker_s {
747752
/* The waker status. */
748753
ZEND_ASYNC_WAKER_STATUS status;

0 commit comments

Comments
 (0)