#weak-references #reference #arc #reference-counting #fork #sync #thin

stylo_arc

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

1 unstable release

0.4.0 Oct 12, 2024

#9 in #weak-references

Download history 107/week @ 2024-10-06 105/week @ 2024-10-13 60/week @ 2024-10-20 65/week @ 2024-10-27 141/week @ 2024-11-03

478 downloads per month
Used in 5 crates

MIT/Apache

42KB
759 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

~170KB