sta / sta/websocket-sharp

WebSocket Sharp Thread Pool Usage

Open
#342 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hi,
I see that, when multiple messages are sent from WebSocket client to WebSocket Sharp server, server is using some sort of lock to serialize all request dispatch.
Even though there is thread pool in use by server, the incoming messages are not assigned to individual threads, instead, a single thread is processing requests and invoking OnMessage() serially.

This has performance impact for an application that we are developing. Ideally, we want WebSocket to just offload the incoming message on (one of its threads of the pool) and not perform any serialized delegation .

Can you guys throw some information on this?

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by tracing the server's incoming-message dispatch and thread-pool path to the code that invokes OnMessage(), then confirm whether dispatch is intentionally serialized. Done should include a maintainer-confirmed explanation of the behavior or a clearly defined concurrent-dispatch change with verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.