Skip to content

Commit ee7eb25

Browse files
committed
Merge branch 'true-async' into true-async-api-stable
2 parents 2375e07 + b0a7836 commit ee7eb25

26 files changed

+3152
-134
lines changed

Zend/zend_objects_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static bool store_call_destructors_context_switch_handler(
101101
return false;
102102
}
103103

104-
zend_coroutine_t *shutdown_coroutine = ZEND_ASYNC_SPAWN_WITH_SCOPE_EX(ZEND_ASYNC_MAIN_SCOPE, 1);
104+
zend_coroutine_t *shutdown_coroutine = ZEND_ASYNC_SPAWN_WITH_SCOPE_EX(ZEND_ASYNC_MAIN_SCOPE, ZEND_COROUTINE_HI_PRIORITY);
105105
shutdown_coroutine->internal_entry = store_call_destructors_entry;
106106
shutdown_coroutine->extended_dispose = store_call_destructors_coroutine_dtor;
107107

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,6 +1660,9 @@ PHP_ADD_SOURCES([main], m4_normalize([
16601660
]),
16611661
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
16621662

1663+
PHP_ADD_SOURCES([main], m4_normalize([network_async.c]),
1664+
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
1665+
16631666
if printf "#if __ELF__\nelf\n#endif\n" | $CC -E - | grep elf > /dev/null; then
16641667
PHP_ADD_SOURCES([main], [debug_gdb_scripts.c])
16651668

ext/curl/config.m4

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,14 @@ if test "$PHP_CURL" != "no"; then
7272
[AC_MSG_FAILURE([The libcurl check failed.])],
7373
[$CURL_LIBS])
7474

75+
curl_sources="interface.c multi.c share.c curl_file.c curl_async.c"
76+
77+
PKG_CHECK_MODULES([CURL_ASYNC], [libcurl >= 7.87.0], [], [
78+
AC_MSG_ERROR([libcurl >= 7.87.0 is required for TrueAsync due to curl_multi_socket_action crashes in earlier versions])
79+
])
80+
7581
PHP_NEW_EXTENSION([curl],
76-
[interface.c multi.c share.c curl_file.c],
82+
[$curl_sources],
7783
[$ext_shared])
7884
PHP_INSTALL_HEADERS([ext/curl], [php_curl.h])
7985
PHP_SUBST([CURL_SHARED_LIBADD])

ext/curl/config.w32

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ if (PHP_CURL != "no") {
1414
CHECK_LIB("libssh2.lib", "curl", PHP_CURL) &&
1515
CHECK_LIB("nghttp2.lib", "curl", PHP_CURL))
1616
) {
17-
EXTENSION("curl", "interface.c multi.c share.c curl_file.c");
17+
var curl_sources = "interface.c multi.c share.c curl_file.c curl_async.c";
18+
EXTENSION("curl", curl_sources);
1819
AC_DEFINE('HAVE_CURL', 1, "Define to 1 if the PHP extension 'curl' is available.");
1920
ADD_FLAG("CFLAGS_CURL", "/D PHP_CURL_EXPORTS=1");
2021
if (curl_location.match(/libcurl_a\.lib$/)) {

0 commit comments

Comments
 (0)