Project

General

Profile

Actions

Improvements #9046

open
AB

WServer::post() and strand

Improvements #9046: WServer::post() and strand

Added by Adrian B about 5 years ago. Updated about 5 years 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).

AB Updated by Adrian B about 5 years ago Actions #1

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.

Actions

Also available in: PDF Atom