summaryrefslogtreecommitdiff
path: root/src/sync/mod.rs
diff options
context:
space:
mode:
authorDavid Blajda <blajda@hotmail.com>2019-02-03 22:30:15 +0000
committerDavid Blajda <blajda@hotmail.com>2019-02-03 22:30:15 +0000
commit96715ceb58b24ee7220d98e421701daa550f44db (patch)
tree2d00984339efab0549fa07079be623b2a7b634f8 /src/sync/mod.rs
parent0a5892c67fb02e09a621ac8796ac84232935f5c3 (diff)
Add Helix and Kraken scopes. Client Config and allow injecting of responses
Diffstat (limited to 'src/sync/mod.rs')
-rw-r--r--src/sync/mod.rs42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/sync/mod.rs b/src/sync/mod.rs
index ca06d32..74e4235 100644
--- a/src/sync/mod.rs
+++ b/src/sync/mod.rs
@@ -1,44 +1,2 @@
-//f.barrier(auth).barrier(ratelimit).and_then(|result| {})
-//A ratelimiter must be aware when a limit is hit, the upper limit,
-//and remaining requests. (use case specific)
-//
-//This can be done by either letting the ratelimiter drive the request
-//so it can inspect returned headers or by maybe? using a channel to inform
-//the limiter
-//
-//Submit task to ratelimiter.
-//Check if the limit is hit and if we are polling
-// 1 if we hit the limit and are not polling, add to the queue and start
-// polling.
-// 2. if we are polling add the request to the queue
-// 3. if we are not polling and not locked then
-// send the request and increment the in-flight counter.
-//
-// when the request has completed without errors then decrement
-// the in-flight counter, update limiter data, and return the
-// result to the requester.
-//
-// On error, EITHER:
-// 1. If the error is rate limiter related place the request
-// back in a queue, return other errors. (Prevents starvation)
-// 2. Return all errors back to the Requester they can resubmit
-// the request
-//
-// The main difference is that the condition is dependent on the waiter's
-// future result.
-//
-// For auth requests we can use an OkFuture that returns the waiter and never errs
-//
-// So waiters must provide IntoFuture, a future than can poll the condition,
-// and a is locked.
-// The lock check must be pure (no side effects) but IntoFuture may
-// have side effects (eg. increments in-flight counter)
-//
-// The result of the IntoFuture is returned to caller or the Err of the poll
-// Future. For simplicity these will be the same type.
-//
-// Should the poll condition trait be located on the Waiter or the Barrier?
-// All waiters in a barrier must use the same condition.
-
pub mod barrier;
pub mod waiter;