Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions aimdb-core/src/typed_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@ where
self.write.push(value);
}

/// Non-blocking push. Returns the value back via [`TryProduceError::Full`]
/// if a bounded buffer is at capacity, or [`TryProduceError::Closed`] if
/// the record is shutting down. Use when the caller has a meaningful
/// response to backpressure.
/// Lets a write handle report that it rejected a value.
///
/// Overwriting buffers (`SpmcRing`, `SingleLatest`, `Mailbox`) always
/// return `Ok(())`. Use [`produce`](Self::produce) for those.
/// All current buffers (`SpmcRing`, `SingleLatest`, `Mailbox`) overwrite
/// existing values when full and return `Ok(())`. Use
/// [`produce`](Self::produce) for them. A future buffer that refuses a
/// write when full can return the value through [`TryProduceError::Full`].
/// A buffer that detects closure can return it through
/// [`TryProduceError::Closed`].
///
/// # Example
///
Expand Down
10 changes: 10 additions & 0 deletions aimdb-sync/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed (breaking)

- **Issue #212:** Removed `SyncProducer::try_set`,
`SyncProducer::try_set_value`, and `SyncError::SetTimeout`. Every built-in
buffer overwrites rather than refusing a write, so these APIs duplicated
`set()` and `set_value()` without providing distinct behavior.

## [0.6.0] - 2026-09-18

### Added
Expand Down Expand Up @@ -159,6 +166,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Capacity-related API removed: `AimDbBuilderSyncExt::producer_with_capacity`/`consumer_with_capacity` and the `DEFAULT_SYNC_CHANNEL_CAPACITY` constant are gone.
- `SyncConsumer`: `get`, `try_get`, `get_with_timeout`, `get_latest`, and `get_latest_with_timeout` now take `&mut self` (was `&self`)
- `SyncConsumer` no longer implements `Clone` or `Sync` (still `Send`).
- `BufferLagged` now reaches callers of `get`, `get_with_timeout`, and
`try_get` as `SyncError::Db(DbError::BufferLagged { .. })`; the old
forwarding task swallowed it.
- **Migration.** The replacement for a cloned consumer is a second
`handle.consumer()` — but note that it is not a like-for-like swap.
Cloning in 0.5.0 shared one stream, so each clone got *a share* of the
Expand Down
2 changes: 1 addition & 1 deletion aimdb-sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ std = ["aimdb-core/std", "dep:tokio", "dep:aimdb-tokio-adapter", "dep:libc"]
tracing = ["aimdb-core/tracing"]
log = ["aimdb-core/log"]

# SyncProducer::set_value / try_set_value / set_value_at for Settable types
# SyncProducer::set_value / set_value_at for Settable types
data-contracts = ["dep:aimdb-data-contracts"]

# Fork detection only, and only where `pthread_atfork` exists. Optional and
Expand Down
Loading
Loading