Skip to content

How to force a single thread server? #651

@tobiascapin

Description

@tobiascapin

Hi, I'm using nanohttpd as local REST api server that has to serve a single client at once.
I don't want to have multiple threading due to the fact I need to process the request exacltly in the receive order and I see with the standard implementation sometimes the requests order are mixed.
I tried to add a synchronized block into the server method but it didn't help, then I'm trying to understand if I can force a single-thread custom AsyncRunner but I didn't find documentation about it.

Is it possibile to define a single threaded AsyncRunner?
Do you have any other idea about?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions