DrainPermitsAsync Method DrainPermitsAsync() Acquires and returns all permits that are available. Declaration Task<int> DrainPermitsAsync() Returns Task<int> The number of permits that were drained.