Code Monkey home page Code Monkey logo

Comments (4)

zhouchunliang avatar zhouchunliang commented on May 18, 2024 4

网络框架和计算框架其中重要的的区别是:msgqueue是网络通信使用,epoll检测到对应的事件,连同上下文信息一起放入epoll res中,然后放到msgqueue中,线程池在从中取进行处理,最后调用回掉函数;而计算框架是将待需处理的任务/请求放置到任务队列(连同entry),任务队列如有任务,初始化创建的线程池进行任务的处理,最后调用回掉函数;

from workflow.

zhouchunliang avatar zhouchunliang commented on May 18, 2024

msgqueue是网络通信使用的哈,entry就是网络通信的上下文~这里的上下文,是给网络线程和调度线程用的:
网络线程从socket切一份数据下来,扔给msgqueue;
调度线程从msgqueue拿一份数据下来(包括它的上下文)就可以继续处理了,最后执行到用户的callback;

from workflow.

Barenboim avatar Barenboim commented on May 18, 2024

问题及回答来源于QQ群。欢迎群里的小伙伴将有代表性的问题直接发到issue,这样可以帮到更多的用户。我们回答问题,贴代码也更加方便。

from workflow.

chanchann avatar chanchann commented on May 18, 2024

msgqueue simple analysis : https://github.com/chanchann/workflow_annotation/blob/main/src_analysis/08_msgqueue.md

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.