Project

General

Profile

Improvements #9046

WServer::post() and strand

Added by Adrian B 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/08/2021
Due date:
% Done:

0%

Estimated time:

Description

I see that WServer::post() uses an unique boost::asio::io_service::strand (in WIOService.C)

Would it not be better to add a strand per session ?
It would allow all the worker to be used concurrently to process work from distinct sessions.
Currently, if post() have been used for multiple session, only one worker/thread will handle the load at a time, which seems rather inefficient.

In this case, the session lock would not be needed anymore (if all access to the session goes through post() or the strand).

#1

Updated by Adrian B 3 months ago

Also, no locking is done inside the worker, so we don't occasionally keep a worker busy doing nothing apart waiting for another posted event of the same session to be completely processed.

Also available in: Atom PDF