- The context can be anything that implements clone. To get the behaviour from v0.5.x, wrap contexts in
Arc::new
fornon_blocking
andRc::new
forblocking
.
- Switched back to guarding contexts with
Rc
/Arc
. Interior mutability is still possible with the power ofRefCell
. - Removed the
Context
andThreadSafeContext
trait. Now all Rust types that meet the lifetime/thread-safety requirements can be used as contexts without any extra trait implementations.listen(stream, || EmptyCtx, handler)
can be replaced with eitherlisten(stream, || (), handler)
orlisten(stream, empty_ctx, handler)
.
- I moved to an error-framework agnostic error handling approach, removing the dependency on anyhow.
I pulled this release because printfn found that via thread-local storage UB could be entered by storing multiple mutable references to the context and also being able to keep the references after dropping the context.
- Switched to using plain references over
Rc
/Arc
- Added benchmark tests