Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[6.0]add SW_THREAD_LOCAL #5619

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext-src/swoole_odbc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#ifdef SW_USE_ODBC

static bool swoole_odbc_blocking = true;
static SW_THREAD_LOCAL bool swoole_odbc_blocking = true;

#ifdef SQL_ATTR_CONNECTION_POOLING
zend_ulong pdo_odbc_pool_on = SQL_CP_OFF;
Expand Down
2 changes: 1 addition & 1 deletion ext-src/swoole_oracle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#ifdef SW_USE_ORACLE

static bool swoole_oracle_blocking = true;
static SW_THREAD_LOCAL bool swoole_oracle_blocking = true;
void swoole_oracle_set_blocking(bool blocking) {
swoole_oracle_blocking = blocking;
}
Expand Down
2 changes: 1 addition & 1 deletion ext-src/swoole_pgsql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using swoole::Coroutine;
using swoole::coroutine::Socket;
using swoole::coroutine::translate_events_to_poll;

static bool swoole_pgsql_blocking = true;
static SW_THREAD_LOCAL bool swoole_pgsql_blocking = true;

static int swoole_pgsql_socket_poll(PGconn *conn, swEventType event, double timeout = -1) {
if (swoole_pgsql_blocking) {
Expand Down
2 changes: 1 addition & 1 deletion ext-src/swoole_sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifdef SW_USE_SQLITE
using swoole::Coroutine;

static bool swoole_sqlite_blocking = true;
static SW_THREAD_LOCAL bool swoole_sqlite_blocking = true;

void swoole_sqlite_set_blocking(bool blocking) {
if (blocking) {
Expand Down
Loading