shared-buffer-rs 0.4.0

A library which combines Arc and RefCell for Send and Sync
Documentation
[package]
name = "shared-buffer-rs"
version = "0.4.0"
authors = ["Aleksandr Morozov <alex@nixd.org>"]
edition = "2024"
description="A library which combines Arc and RefCell for Send and Sync"
repository = "https://codeberg.org/4neko/shared-buffer-rs"
keywords = ["thread-safe", "buffer"]
categories = ["memory-management"]
license="MIT"

[features]
default = ["std", "default_flags"]

# A program which includes this crate is based on standart library i.e std.
# For non-std an alloc crate is exported.
# Enabled by default.
std = []

default_flags = ["clone_wait_indef", "enable_async"]

# Enables the async code. For NOSTD the core::future will be used if this 
# feature is enabled.
enable_async = []

# ENABLED BY DEFAULT for STD
# When clone() is called for RBuffer or RwBuffer it attempts to clone the instance
# in a reasonable time frame (normally while backoff is not completed). When backoff
# completes, crate panics to avoid dead locks. If this feature is enabled, thread
# does not panic, but resets the backoff and continues until succeedes.
clone_wait_indef = []

[dependencies]
crossbeam-utils = { version = "~0.8" }

[dev-dependencies]
futures-test = "0.3"
futures = { version = "0.3", features = ["executor", "alloc", "thread-pool", "std"] }
divan = "0.1.21"

[[example]]
name = "example1"

[[bench]]
name = "access_test"
harness = false