MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / connSetWriteHandlerWithBarrier

Function connSetWriteHandlerWithBarrier

src/connection.h:181–183  ·  view source on GitHub ↗

Set a write handler, and possibly enable a write barrier, this flag is * cleared when write handler is changed or removed. * With barrier enabled, we never fire the event if the read handler already * fired in the same event loop iteration. Useful when you want to persist * things to disk before sending replies, and want to do that in a group fashion. */

Source from the content-addressed store, hash-verified

179 * fired in the same event loop iteration. Useful when you want to persist
180 * things to disk before sending replies, and want to do that in a group fashion. */
181static inline int connSetWriteHandlerWithBarrier(connection *conn, ConnectionCallbackFunc func, int barrier, bool fThreadSafe = false) {
182 return conn->type->set_write_handler(conn, func, barrier, fThreadSafe);
183}
184
185static inline void connClose(connection *conn) {
186 conn->type->close(conn);

Callers 2

clusterSendMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected