@@ -137,9 +137,6 @@ typedef struct _zend_async_iterator_s zend_async_iterator_t;
137
137
typedef struct _zend_fcall_s zend_fcall_t ;
138
138
typedef void (* zend_coroutine_entry_t )(void );
139
139
140
- /* Future resolve function type */
141
- typedef void (* zend_future_resolve_t )(zend_future_t * future , zval * value , zend_object * exception , bool transfer_error );
142
-
143
140
/* Channel method function types */
144
141
typedef bool (* zend_channel_send_t )(zend_async_channel_t * channel , zval * value );
145
142
typedef bool (* zend_channel_receive_t )(zend_async_channel_t * channel , zval * result );
@@ -982,41 +979,6 @@ struct _zend_coroutine_s {
982
979
zend_coroutine_switch_handlers_vector_t * switch_handlers ;
983
980
};
984
981
985
- /**
986
- * zend_future_t structure represents a future result container.
987
- * It inherits from zend_async_event_t to participate in the event system.
988
- */
989
- struct _zend_future_s {
990
- zend_async_event_t event ; /* Event inheritance (first member) */
991
- zval result ; /* Result value (UNDEF = pending) */
992
- zend_object * exception ; /* Exception object (NULL = no error) */
993
-
994
- /* Debug information */
995
- zend_string * filename ; /* Creation file */
996
- uint32_t lineno ; /* Creation line */
997
- zend_string * resolved_filename ; /* Resolution file */
998
- uint32_t resolved_lineno ; /* Resolution line */
999
-
1000
- /* Resolution method */
1001
- zend_future_resolve_t resolve ;
1002
- };
1003
-
1004
- /**
1005
- * zend_async_channel_t structure represents a communication channel.
1006
- * It inherits from zend_async_event_t to participate in the event system.
1007
- */
1008
- struct _zend_async_channel_s {
1009
- zend_async_event_t event ; /* Event inheritance (first member) */
1010
-
1011
- /* Debug information */
1012
- zend_string * filename ; /* Creation file */
1013
- uint32_t lineno ; /* Creation line */
1014
-
1015
- /* Channel-specific method pointers */
1016
- zend_channel_send_t send ; /* Send method */
1017
- zend_channel_receive_t receive ; /* Receive method */
1018
- };
1019
-
1020
982
/**
1021
983
* The macro evaluates to TRUE if the coroutine is in a waiting state —
1022
984
* either waiting for events or waiting in the execution queue.
@@ -1103,6 +1065,42 @@ struct _zend_async_context_s {
1103
1065
zend_async_context_dispose_t dispose ;
1104
1066
};
1105
1067
1068
+ ///////////////////////////////////////////////////////////////
1069
+ /// Future
1070
+ ///////////////////////////////////////////////////////////////
1071
+
1072
+ /**
1073
+ * zend_future_t structure represents a future result container.
1074
+ * It inherits from zend_async_event_t to participate in the event system.
1075
+ */
1076
+ struct _zend_future_s {
1077
+ zend_async_event_t event ; /* Event inheritance (first member) */
1078
+ zval result ; /* Result value */
1079
+ zend_object * exception ; /* Exception object (NULL = no error) */
1080
+ };
1081
+
1082
+ #define ZEND_FUTURE_F_THREAD_SAFE (1u << 10)
1083
+ #define ZEND_FUTURE_F_IGNORE (1u << 11)
1084
+
1085
+ ///////////////////////////////////////////////////////////////
1086
+ /// Channel
1087
+ ///////////////////////////////////////////////////////////////
1088
+
1089
+ /**
1090
+ * zend_async_channel_t structure represents a communication channel.
1091
+ * It inherits from zend_async_event_t to participate in the event system.
1092
+ */
1093
+ struct _zend_async_channel_s {
1094
+ zend_async_event_t event ; /* Event inheritance (first member) */
1095
+
1096
+ /* Channel-specific method pointers */
1097
+ zend_channel_send_t send ; /* Send method */
1098
+ zend_channel_receive_t receive ; /* Receive method */
1099
+ };
1100
+
1101
+ #define ZEND_ASYNC_CHANNEL_F_THREAD_SAFE (1u << 10)
1102
+
1103
+
1106
1104
///////////////////////////////////////////////////////////////
1107
1105
/// Global Macros
1108
1106
///////////////////////////////////////////////////////////////
0 commit comments