Code Monkey home page Code Monkey logo

Comments (6)

jrmuizel avatar jrmuizel commented on June 12, 2024 1

I don't think it's safe to trace through the RefCell if it's already borrowed. A Drop implementation could mutate it during cycle collection which will break tracing.

In rust-gc GcCell roots the value in borrow_mut():
https://github.com/Manishearth/rust-gc/blob/e362a0687260534305b2749f986da3f0df1ec356/gc/src/lib.rs#L446

and won't trace through GcCell if it's borrowed:
https://github.com/Manishearth/rust-gc/blob/e362a0687260534305b2749f986da3f0df1ec356/gc/src/lib.rs#L464

from bacon-rajan-cc.

fitzgen avatar fitzgen commented on June 12, 2024

This crate never got fully usable.

At minimum, it needs to have its own fork of RefCell that it can see inside of regardless of borrow status so that it can trace the thing's edges. There are probably a lot more issues than just that, but that's what I remember.

Happy to give collaboratorship / co-ownership if you want to finish this!

from bacon-rajan-cc.

jrmuizel avatar jrmuizel commented on June 12, 2024

Yeah, I'm some what interested. I got it building here: https://github.com/jrmuizel/bacon-rajan-cc/tree/nightly. I'll try to get it split up into more reviewable chunks and post PRs.

from bacon-rajan-cc.

jrmuizel avatar jrmuizel commented on June 12, 2024

Can you elaborate a bit more on the RefCell issue?

from bacon-rajan-cc.

fitzgen avatar fitzgen commented on June 12, 2024

If cycle collection kicks in while a refcell is borrowed, it may need to trace through the refcell, but that will assert since it is already borrowed. Need a version that allows tracing regardless whether it is borrowed.

from bacon-rajan-cc.

jrmuizel avatar jrmuizel commented on June 12, 2024

This is done now.

from bacon-rajan-cc.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.