Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2808

Use ValueTask and IValueTaskSource for OperationBase.Completed

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.1.1
    • 3.1.2
    • None
    • None
    • 1

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          jmorris Jeff Morris added a comment -

          Thanks Brant!

          jmorris Jeff Morris added a comment - Thanks Brant!

          People

            btburnett3 Brant Burnett
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty