tbox
tbox copied to clipboard
🎁 A glib-like multi-platform c library
`tb_long_t tb_socket_recv(tb_socket_ref_t sock, tb_byte_t* data, tb_size_t size) { // check tb_assert_and_check_return_val(sock && data, -1); tb_check_return_val(size, 0); #ifndef TB_CONFIG_MICRO_ENABLE // attempt to use iocp object to recv data if exists tb_iocp_object_ref_t...
在tb_socket_recv 中: // continue? if (errno == EINTR || errno == EAGAIN) return 0; 有个可能性探讨下: 信号中断产生的EINTR, EPOLLET下 数据还未读完,不会产生可读事件,连接来了新数据也没有事件,连接大概会空闲超时?EINTR 应该 continue 处理, 其他EINTR地方可能也要注意
大佬, 有没有考虑编译成 webassembly 呢。 不知道是否可行。
现在没有本地缓存的功能,希望以后能支持,这个功能还是经常会用到的。 参考链接: 1. https://juejin.im/post/5b8df63c6fb9a019e04ebaf4 2. http://thoreauz.com/2018/02/08/algorithm/cache/local-cache/ 3. https://github.com/ben-manes/caffeine 4. https://github.com/mandreyel/w-tinylfu
impl lockfree data structure . spsc queue .....
References * [https://github.com/google/sanitizers/issues/189](https://github.com/google/sanitizers/issues/189) How to enable sanitize-address? ```console $ xmake f -m asan --coroutine=y $ xmake r demo coroutine_stream http://www.tboox.org ```
> Note: If you use the fuzzy expressions such as 'can't use/no effect/problem/error', but don't give any relevant auxiliary information according to the template below, this issue will be not...