Skip to content

Why does the IRequestProcessor.Process() need async code inside? #312

Closed

Description

https://github.com/Azure/amqpnetlite/blob/master/Examples/PeerToPeer/PeerToPeer.Server/Program.cs#L67

I noticed that when I implement IRequestProcessor.Process() with long running sync code that sends a lot of big message on the response link, it will get stuck after some time.

At the moment I'm doing stupid things like

            async Task ReplyAsync(RequestContext requestContext)
            {
                await Task.Run(() =>
                {
                     // sync code
                });
            }

just to keep it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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