This commit is contained in:
parent
73aeefb46f
commit
1d898b8257
14
.drone.yml
Normal file
14
.drone.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: rust
|
||||||
|
commands:
|
||||||
|
- cargo build --verbose --all
|
||||||
|
|
||||||
|
- name: fmt-check
|
||||||
|
image: rust
|
||||||
|
commands:
|
||||||
|
- rustup component add rustfmt
|
||||||
|
- cargo fmt --all -- --check
|
@ -247,7 +247,8 @@ where
|
|||||||
Event::Synchronized(_res) => self.context.synchronized.notify_waiters(),
|
Event::Synchronized(_res) => self.context.synchronized.notify_waiters(),
|
||||||
Event::Response(mid, resp) => {
|
Event::Response(mid, resp) => {
|
||||||
let prev_value = self.context.processing.fetch_sub(1, Ordering::SeqCst);
|
let prev_value = self.context.processing.fetch_sub(1, Ordering::SeqCst);
|
||||||
if prev_value == 1 { // last task completes
|
if prev_value == 1 {
|
||||||
|
// last task completes
|
||||||
self.context.idle.notify_waiters();
|
self.context.idle.notify_waiters();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,14 +75,8 @@ macro_rules! buffer_unordered_batch_poller_macro {
|
|||||||
let buffer_clone = buffer.drain(..).collect();
|
let buffer_clone = buffer.drain(..).collect();
|
||||||
|
|
||||||
#[allow(clippy::redundant_closure_call)]
|
#[allow(clippy::redundant_closure_call)]
|
||||||
let _ = ($st1)(
|
let _ =
|
||||||
buffer_mid_clone,
|
($st1)(buffer_mid_clone, buffer_clone, bus, ut, task_permit, stx);
|
||||||
buffer_clone,
|
|
||||||
bus,
|
|
||||||
ut,
|
|
||||||
task_permit,
|
|
||||||
stx,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Request::Action(Action::Init(..)) => {
|
Request::Action(Action::Init(..)) => {
|
||||||
@ -100,14 +94,8 @@ macro_rules! buffer_unordered_batch_poller_macro {
|
|||||||
let task_permit = semaphore.clone().acquire_owned().await;
|
let task_permit = semaphore.clone().acquire_owned().await;
|
||||||
|
|
||||||
#[allow(clippy::redundant_closure_call)]
|
#[allow(clippy::redundant_closure_call)]
|
||||||
let _ = ($st1)(
|
let _ =
|
||||||
buffer_mid_clone,
|
($st1)(buffer_mid_clone, buffer_clone, bus, ut, task_permit, stx);
|
||||||
buffer_clone,
|
|
||||||
bus,
|
|
||||||
ut,
|
|
||||||
task_permit,
|
|
||||||
stx,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = semaphore.acquire_many(cfg.max_parallel as _).await;
|
let _ = semaphore.acquire_many(cfg.max_parallel as _).await;
|
||||||
|
Loading…
Reference in New Issue
Block a user