| Crates.io | emixthreading |
| lib.rs | emixthreading |
| version | 0.6.0 |
| created_at | 2026-01-11 14:21:30.221233+00 |
| updated_at | 2026-01-11 14:21:30.221233+00 |
| description | Synchronization primitives, task orchestration, and spinner utilities built on emixcore. |
| homepage | |
| repository | https://github.com/asm2025/essentialmix-rs |
| max_upload_size | |
| id | 2035872 |
| size | 201,112 |
emixthreading provides synchronization primitives, producer/consumer helpers,
spinners, and async blocking utilities that build on emixcore::Error.
cond: Manual reset conditions and cross-thread notifications.consumer: Awaitable producer/consumer abstractions.signal: Cancellation-aware signals.spinner: Terminal spinners built on indicatif.constants: Shared timing constants for queues and waits.[dependencies]
emixthreading = { path = "../../crates/threading" }
Manual spinner:
use emixthreading::Spinner;
let spinner = Spinner::with_prefix("sync ".into());
spinner.tick();
spinner.finish_with_message("done");
Timeout waiting for an async worker:
use emixthreading::{wait_for_async, TaskResult};
use std::sync::Arc;
use tokio::sync::Notify;
struct Worker {
cancelled: bool,
finished: bool,
}
impl emixthreading::AwaitableConsumer<TaskResult> for Worker {
fn is_cancelled(&self) -> bool { self.cancelled }
fn is_finished(&self) -> bool { self.finished }
}
// Wait up to 5 seconds for a completion signal.
wait_for_async(
&Worker { cancelled: false, finished: true },
std::time::Duration::from_secs(5),
&Arc::new(Notify::new()),
).await.ok();
Browse the tests/ directory for more advanced queue coordination patterns and
signal-handling examples.