MyGit

v20.57.0

uNetworking/uWebSockets

版本发布时间: 2024-01-22 19:21:27

uNetworking/uWebSockets最新发布版本:v20.64.0(2024-07-04 03:06:24)

Experimental cross-platform uWS::LocalCluster

We've always supported multi-CPU scaling as detailed in the HelloWorldThreaded.cpp example and benchmarking blog posts. However, this example has only been properly supported on Linux systems and contained some really ugly boiler plate code.

This release adds the uWS::LocalCluster helper that works properly on Windows, macOS, Linux and makes it easy to take any single-CPU app and make it scale over all available CPU-cores by default:

uWS::App(options).get(pattern, handler).listen(port, handler).run();

simply becomes

uWS::LocalCluster(options, [](uWS::App &app) {
  app.get(pattern, handler).listen(port, handler);
});

This is reflected in the updated HelloWorldThreaded.cpp example and works for both SSL and non-SSL clusters.

v20.56.0 on macOS (capped at 99% CPU-time)

Screenshot 2024-01-22 at 11 46 36

v20.57.0 on macOS (approaches 800% CPU-time)

Screenshot 2024-01-22 at 11 43 57

相关地址:原始地址 下载(tar) 下载(zip)

查看:2024-01-22发行的版本