Skip to content

Request: !Send/Sync handlers (IE thread-local handlers) #837

Open
@jkelleyrtp

Description

@jkelleyrtp

I love Tide, but the requirement of Send/Sync on handlers can be an obstacle at times. I believe Actix provides handlers that don't have the send/sync requirement by running them on a per-thread basis. Is there any way to achieve non Send/Sync handlers with Tide?

If there isn't - I'd be interested in figuring out how to add it.

Right now, I'm building a task system outside of the Tide app, and then passing in a channel handler as state, which is a fine pattern, but would be useful if I could just run the !Send futures directly in a handler - since it's very likely that the request will stay on the same thread anyways.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designOpen design questionenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions