Comments (6)
我测试过了,没有问题,诸位可以参考新加的 examples/concurrency_test.cc 里的写法,每次调用都创建一个新的 ClientSession,不要在多个线程间复用 ClientSession 对象。
此外,程序第一次运行可能会慢一些,这是 ASIO 或底层 socket 的问题,暂时我还不太清楚。
from webcc.
我通过项目中的helloworld示例,修改server.run(10); HelloWorld视图中加入线程延时并打印运行时间,发现,同时发起两个请求时,请求并不是并行执行的,还是一个请求执行完了之后再执行第二个请求。 所以server.run(10)中的worker个数和并发请求的处理无关?
from webcc.
请问如何让server能够处理并发?
from webcc.
同问
from webcc.
谢谢反馈,正在调查原因,以前没有这个问题。我会尽快解决。
from webcc.
thinks
from webcc.
Related Issues (20)
- How to upload multi-files or response with multi-files? HOT 3
- How to streaming files, i.e., for MP4 file? HOT 1
- 关于头文件问题 HOT 1
- Max OS 10.14 编译报错 HOT 1
- 请问如何异步request? HOT 1
- centos gcc 4.8.5 ? HOT 9
- Add as a subdirectory HOT 2
- 怎么不把boost库以及zlib openssl去掉呢 HOT 2
- Very slow response HOT 30
- 如何修改每次只读取1024字节 HOT 19
- 请问支持HTTPS双向认证么? HOT 2
- webcc头文件报了错
- webcc 头文件报错 HOT 2
- 如何复用io_service HOT 2
- 为啥不提供异步接口 HOT 2
- Windows Compile HOT 4
- VS编译标准示例报错无法解析的外部符号 HOT 1
- Persistent Connections HOT 3
- pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webcc.