Skip to content

Support ValueTask and/or sync calls in hubs #307

@XDracam

Description

@XDracam

Thanks for the library, it's working great so far!

For performance, it's sometimes preferable to use ValueTask<T> instead of Task<T> to avoid an allocation if there is no actual asynchronicity involved. Many of my simpler hub methods really do not do anything async, and thus don't benefit from Task<T> on the backend side.

My specific request:

  1. allow methods in hubs to have a ValueTask instead of a Task and generate the exact same resulting typescript code
  2. (optional) allow methods in hubs to just not be async at all, which should be supported by SignalR.

If you want help and a timely release is possible, you can give me code entry points and I can work on this myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions