curfew 0.0.5

A deadline-aware fork-join model where multiple tasks run in parallel, but only those that finish before a specified absolute clock time are joined and their results collected.
Documentation
#![forbid(unsafe_code)]
#![warn(missing_docs)]
#![warn(rust_2018_idioms)]
//! `curfew` provides a deadline-aware fork-join abstraction for Rust.
//!
//! The crate exposes two primary building blocks:
//! - [`DeadlineJoiner`] to manage groups of threads and collect only those
//!   completing before an absolute [`Instant`](std::time::Instant) deadline.
//! - [`join_with_deadline`] to attempt joining an individual `JoinHandle`
//!   before a deadline while still allowing late results to be recovered.
//! - Enable the `tokio` feature to unlock async counterparts
//!   (`DeadlineJoinerAsync` and `join_with_deadline_async`) with matching semantics.
//!
//! All utilities operate entirely in safe Rust and gracefully skip work that
//! runs past the deadline without attempting to cancel or terminate threads.

mod deadline_joiner;
mod join_with_deadline;
mod outcome;

#[cfg(feature = "tokio")]
mod async_support;

pub use deadline_joiner::{DeadlineJoiner, DeadlineSummary};
pub use join_with_deadline::{join_with_deadline, JoinOutcome, LateTask};
pub use outcome::{PanicInfo, TaskId, TaskOutcome, TaskResult, TimedOutTask};

#[cfg(feature = "tokio")]
pub use async_support::{
    join_with_deadline_async, DeadlineJoinerAsync, JoinOutcomeAsync,
    LateTaskAsync,
};