Giter Club home page Giter Club logo

Comments (6)

sprinfall avatar sprinfall commented on May 16, 2024 1

我测试过了,没有问题,诸位可以参考新加的 examples/concurrency_test.cc 里的写法,每次调用都创建一个新的 ClientSession,不要在多个线程间复用 ClientSession 对象。
此外,程序第一次运行可能会慢一些,这是 ASIO 或底层 socket 的问题,暂时我还不太清楚。

from webcc.

PL23K avatar PL23K commented on May 16, 2024

我通过项目中的helloworld示例,修改server.run(10); HelloWorld视图中加入线程延时并打印运行时间,发现,同时发起两个请求时,请求并不是并行执行的,还是一个请求执行完了之后再执行第二个请求。 所以server.run(10)中的worker个数和并发请求的处理无关?

from webcc.

PL23K avatar PL23K commented on May 16, 2024

请问如何让server能够处理并发?

from webcc.

xiaobingcaicai avatar xiaobingcaicai commented on May 16, 2024

同问

from webcc.

sprinfall avatar sprinfall commented on May 16, 2024

谢谢反馈,正在调查原因,以前没有这个问题。我会尽快解决。

from webcc.

PL23K avatar PL23K commented on May 16, 2024

thinks

from webcc.

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.