Use ValueTask and IValueTaskSource for OperationBase.Completed

Description

We can reduce heap allocations for operations by not allocating a TaskCompleteSource and Task for every operation (times the number of attempts for retries). Instead, we can use ValueTask and IValueTaskSource, keeping the required fields on the OperationBase object already allocated using the ManualResetValueTaskSourceCore structure.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:

Jeffry Morris February 2, 2021 at 2:21 AM

Thanks Brant!

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created January 28, 2021 at 11:19 PM
Updated February 2, 2021 at 2:21 AM
Resolved February 2, 2021 at 2:21 AM
Instabug