Project

General

Profile

Actions

Improvements #9046

open

WServer::post() and strand

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

Actions #1

Updated by Adrian B about 3 years 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.

Actions

Also available in: Atom PDF