Anthony Ramine
c113fbb640
Always upgrade existing weak child references in the rule tree
...
Just because we didn't find a child when read-locking a node children list
doesn't mean it still won't exist while we wait to upgrade the read lock
into a write lock to create the child.
2020-04-18 12:11:34 +02:00
Anthony Ramine
a30da7ad8e
Introduce a new type UnsafeBox<T> in the rule tree
...
This lets us rely less on raw pointers, thus better tracking the lifetime
of the rule node values while dropping strong references etc.
2020-04-17 12:41:10 +02:00
Anthony Ramine
bc4e2942bf
Make StrongRuleNode::downgrade be unsafe
2020-04-17 12:41:09 +02:00
Anthony Ramine
fb28ce6bbe
Make StrongRuleNode::ensure_child take a StrongRuleNode for the root
2020-04-17 12:41:09 +02:00
Anthony Ramine
37c70609f9
Remove WeakRuleNode::clone
...
MallocSizeOf for RuleTree should not keep around weak references in
case someone runs a GC meanwhile.
2020-04-17 12:41:09 +02:00
Anthony Ramine
e06e164571
Make WeakRuleNode::from_ptr be unsafe
2020-04-17 12:41:09 +02:00
Anthony Ramine
05accaa7bd
Make StrongRuleNode::from_ptr be unsafe
2020-04-17 12:41:08 +02:00
Anthony Ramine
e5cb3d2a4c
Move the meat of the rule tree to a submodule "core"
2020-04-17 12:41:08 +02:00