/// <summary> /// Acquires and returns all permits that are immediately available. /// </summary> /// <returns> the number of permits acquired </returns> public virtual int DrainPermits() { return(Sync.DrainPermits()); }