soft-cycle 0.2.0

Async controller for coordinating soft restarts and graceful shutdowns with shared listeners
Documentation
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2025-02-28

### Added

- **Payload system**: New `payload` module with `Payload` and `AtomicPrimitive` traits. Controller is generic over a payload type `T: Payload`. Supported payloads include `()`, `bool`, integer types (`u8``u64`, `i8``i64`, `usize`, `isize`), and raw pointers (`*mut T`, `*const T`). Enables arbitrary atomic payloads instead of a fixed shutdown/restart boolean.
- **Global payload type**: `SoftCycleMessage` enum (`Shutdown` / `Restart`) with `From`/`Into` `u8` for the default global controller. Global `try_restart` / `try_shutdown` / `listener` / `clear` keep the same signatures but are implemented via `try_notify` / `try_clear` with this payload.
- **Sequence numbers**: `try_notify` returns `Ok(sequence_number)` (monotonically increasing from 0); `try_clear` returns `Ok(sequence_number)` for the notification that was cleared.
- CHANGELOG.md for release history.

### Changed

- **Breaking — controller API**: Replaced `try_restart`, `try_shutdown`, `try_trigger`, and `clear` with `try_notify(payload)``Result<u32, T>` and `try_clear()``Result<u32, ()>`. Controller type is now `SoftCycleController<T: Payload>` (default `T = ()`).
- **Breaking — listener output**: `SoftCycleListener` is now generic and resolves to `Result<T, ()>` (the observed payload) instead of `bool`.
- **Behavior**: When the controller is already in a notified state, a listener resolves **immediately** with that payload, instead of waiting for the next notify.
- **Terminology**: Public docs and Rustdoc use `notify` / `notified` instead of `trigger` / `triggered`.
- README and crate docs rewritten for the new API; `global_instance` still provides async free functions and lazy-initialized global controller.

## [0.1.0] - Initial release

- `SoftCycleController` for coordinating soft restarts and graceful shutdowns.
- `SoftCycleListener` future that resolves to `true` (shutdown) or `false` (restart).
- Controller methods: `new`, `try_restart`, `try_shutdown`, `try_trigger`, `clear`, `listener`.
- Optional `global_instance` feature with process-wide controller and free functions: `get_lifetime_controller`, `try_restart`, `try_shutdown`, `listener`, `clear`.