Skip to content

Forcing async request execution over thread pool #146

Closed
@svejdo1

Description

@svejdo1

In ServiceClient.cs there is this line:

internal async Task<OrganizationResponse> Command_ExecuteAsync(OrganizationRequest req, string errorStringCheck, System.Threading.CancellationToken cancellationToken, bool bypassPluginExecution = false)
{
    return await Task.Run(() => Command_Execute(req, errorStringCheck, bypassPluginExecution), cancellationToken);
}

This is forcing execution of the job over thread pool - that is very expensive - if the goal was not to cause a deadlock over UI applications there are cheaper ways how to avoid it - ref: https://stackoverflow.com/a/28307965/2440262

For our scenarios (backend/server application) execution over thread pool is increasing CPU utilization a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions