diff options
author | Determinant <[email protected]> | 2018-11-18 21:25:05 -0500 |
---|---|---|
committer | Determinant <[email protected]> | 2018-11-18 21:25:05 -0500 |
commit | cff8386147356176228b8c56573005bca2b65d0a (patch) | |
tree | 75b92f7a82c75a18b1a366aa8aa985adecdb1d6e /include | |
parent | a6796aa623b2c34d7f680a5ccae74ec893f16d36 (diff) |
fix data race in feed()
Diffstat (limited to 'include')
-rw-r--r-- | include/salticidae/conn.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h index 2dab517..777c480 100644 --- a/include/salticidae/conn.h +++ b/include/salticidae/conn.h @@ -187,6 +187,8 @@ class ConnPool { } void feed(const conn_t &conn, int client_fd) { + /* the caller should finalize all the preparation */ + std::atomic_thread_fence(std::memory_order_release); tcall.async_call([this, conn, client_fd](ThreadCall::Handle &) { if (conn->mode == Conn::ConnMode::DEAD) { |