Coder Social home page Coder Social logo

Comments (1)

Barenboim avatar Barenboim commented on May 8, 2024

1、idle_list本来是所有的client connection处于keep_alive状态时用的,idle_list里的所有连接下一个动作一定是send。后来发现server处于准备回复状态的连接也很类似。所以对于server的target来讲,idle_list其实最多只有一个连接,并且处于收到请求但还没有回复的阶段。alive_list是service上的成员,保存该serivce上所有keep alive的连接。这个list唯一的作用是drain,就是当连接数达到上限时用于关掉比较久没有使用的连接,以及程序退出的时候关闭所有keep alive连接。
2、ref就是引用计数啊,service需要引用计数到0才解绑完成,connection要ref=0才能释放。因为异步环境下,连接随时可能被关闭,所有需要引用计数,相当于手动shared_ptr。
3、好像SENDING状态没有什么用,就没加。receiving就是正在收数据……

from workflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.