Skip to content

Commit fe7b894

Browse files
committed
php#9: + Added functionality for proper handling of exceptions from Zend iterators (\Iterator and generators).
An exception that occurs in the iterator can now be handled by the iterator’s owner.
1 parent ef9a619 commit fe7b894

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Zend/zend_async_API.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#define ZEND_ASYNC_API "TrueAsync API v0.3.0"
2323
#define ZEND_ASYNC_API_VERSION_MAJOR 0
24-
#define ZEND_ASYNC_API_VERSION_MINOR 2
24+
#define ZEND_ASYNC_API_VERSION_MINOR 3
2525
#define ZEND_ASYNC_API_VERSION_PATCH 0
2626

2727
#define ZEND_ASYNC_API_VERSION_NUMBER \
@@ -339,7 +339,9 @@ typedef void (*zend_async_iterator_method_t)(zend_async_iterator_t *iterator);
339339
/* The maximum number of concurrent tasks that can be executed at the same time */ \
340340
unsigned int concurrency; \
341341
/* Priority for coroutines created by this iterator */ \
342-
int32_t priority;
342+
int32_t priority; \
343+
/* NULLABLE. Exception that stopped the iterator */ \
344+
zend_object * exception;
343345

344346
struct _zend_async_iterator_s {
345347
ZEND_ASYNC_ITERATOR_FIELDS

0 commit comments

Comments
 (0)