#weak-references #reference-counting #arc #servo #sync #data #fork

servo_arc

A fork of std::sync::Arc with some extra functionality and without weak references

4 releases (2 breaking)

Uses old Rust 2015

0.3.0 Jun 21, 2023
0.2.0 Feb 20, 2023
0.1.1 Feb 22, 2018
0.1.0 Jan 12, 2018

#330 in Rust patterns

Download history 93789/week @ 2024-06-11 96293/week @ 2024-06-18 103047/week @ 2024-06-25 97032/week @ 2024-07-02 100509/week @ 2024-07-09 101517/week @ 2024-07-16 120457/week @ 2024-07-23 112803/week @ 2024-07-30 122449/week @ 2024-08-06 115697/week @ 2024-08-13 118199/week @ 2024-08-20 117500/week @ 2024-08-27 128656/week @ 2024-09-03 123249/week @ 2024-09-10 122207/week @ 2024-09-17 108176/week @ 2024-09-24

496,001 downloads per month
Used in 958 crates (3 directly)

MIT/Apache

48KB
874 lines

Fork of Arc for Servo. This has the following advantages over std::sync::Arc:

  • We don't waste storage on the weak reference count.
  • We don't do extra RMU operations to handle the possibility of weak references.
  • We can experiment with arena allocation (todo).
  • We can add methods to support our custom use cases 1.
  • We have support for dynamically-sized types (see from_header_and_iter).
  • We have support for thin arcs to unsized types (see ThinArc).
  • We have support for references to static data, which don't do any refcounting.

Dependencies

~180KB