diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-01-12 06:48:50 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-12 06:48:50 -0600 |
| commit | c68e8b1dfca0059b7495a303a7ac506fe21ed64f (patch) | |
| tree | a81bccbe0a2e2601076eb79d69bc54c6f7454c94 /src/slskd/Common/QueueStrategy.cs | |
| parent | 1398847c27cbcab2af0c7e7890e1cbe3a774fb95 (diff) | |
| parent | c97d2428e880ff1cebb6850a67c947e024ba18ec (diff) | |
| download | slskd-c68e8b1dfca0059b7495a303a7ac506fe21ed64f.tar.gz | |
Merge pull request #323 from slskd/slots
Add option to set a limit for total number of upload slots
Diffstat (limited to 'src/slskd/Common/QueueStrategy.cs')
| -rw-r--r-- | src/slskd/Common/QueueStrategy.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/slskd/Common/QueueStrategy.cs b/src/slskd/Common/QueueStrategy.cs new file mode 100644 index 00000000..50f6cce1 --- /dev/null +++ b/src/slskd/Common/QueueStrategy.cs @@ -0,0 +1,35 @@ +// <copyright file="QueueStrategy.cs" company="slskd Team"> +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// </copyright> + +namespace slskd +{ + /// <summary> + /// Queue strategies. + /// </summary> + public enum QueueStrategy + { + /// <summary> + /// Uploads are prioritized based on the time they became ready. + /// </summary> + RoundRobin = 0, + + /// <summary> + /// Uploads are prioritized based on the time they were enqueued. + /// </summary> + FirstInFirstOut = 1, + } +} |
