0

文档中所述

"Default behavior is the library strives to be quick and accurate"

MEMCACHED_BEHAVIOR_NO_BLOCK
Causes libmemcached(3) to use asychronous IO. This is the fastest transport available for storage functions.

我想知道 MEMCACHED_BEHAVIOR_NO_BLOCK 的默认值是否为 1?

4

1 回答 1

1

默认是false,你可以用 来验证memcached_behavior_get

此行为与//SO_NONBLOCK不同,因为 libmemcached 始终使用非阻塞套接字。看这里这里这里O_NONBLOCKFIONBIO

这可能是由于历史原因,但现在它所做的只是设置SO_LINGER

于 2020-12-04T09:59:44.350 回答