Giter Site home page Giter Site logo

Maybe `Frag: Send`? about sled HOT 9 CLOSED

spacejam avatar spacejam commented on May 5, 2024 2
Maybe `Frag: Send`?

from sled.

Comments (9)

spacejam avatar spacejam commented on May 5, 2024

@jeehoonkang ahh, interesting that I missed this, those should definitely be Send!

I'm looking forward to the port to crossbeam-epoch!

from sled.

spacejam avatar spacejam commented on May 5, 2024

Would it be more convenient for you if I implemented that right now? If not, feel free to add it to your port, and I'd gladly accept a PR for using crossbeam-epoch!

from sled.

jeehoonkang avatar jeehoonkang commented on May 5, 2024

Honestly, I would like to ask if you could add : Send. In fact, I tried to add Send on my own, but I currently couldn't understand the codebase and I am not sure what is the best way to do it: exactly where should I put : Send?

FYI, except for this problem, it seems rsdb is successfully compiled with crossbeam-epoch's PR on garbage management: crossbeam-rs/crossbeam-epoch#5

from sled.

spacejam avatar spacejam commented on May 5, 2024

I'll do that now. I think the best place to implement it at first will be on the requirement of the wrapped T in the stack and radix trees, as those are the underlying shared containers that threads share state with. This is sort of a specialized stack for this use case and I don't care about supporting single-threaded usage by conditionally allowing non-Send wrapped T's.

This will be out in like 10 minutes, stay tuned!

from sled.

spacejam avatar spacejam commented on May 5, 2024

Also need Sync because multiple threads may be iterating over the same stacks to materialize views of pages simultaneously...

from sled.

spacejam avatar spacejam commented on May 5, 2024

waiting on https://github.com/spacejam/rsdb/pull/90 to pass tsan/lsan then merging and publishing version 0.8.0.

I did not implement Send on Frag because it should have been auto-derived, due to consisting entirely of other types that are Send. @jeehoonkang please let me know if this addresses the issue or not! I'll post here again after publishing the crate.

from sled.

spacejam avatar spacejam commented on May 5, 2024

@jeehoonkang 0.8.0 published, let me know if that works for you!

from sled.

jeehoonkang avatar jeehoonkang commented on May 5, 2024

Thanks! I ported rsdb to crossbeam-epoch: https://github.com/jeehoonkang/rsdb/commit/dc533833fefd07ec8ab1e2b9b4e1075490c1b52e

cargo test worked, but I couldn't run lsan and tsan yet.

I needed to add T: Sync for several methods in Stack: https://github.com/jeehoonkang/rsdb/commit/dc533833fefd07ec8ab1e2b9b4e1075490c1b52e#diff-b9fd53db7195b303c4713ea2c461ed52R146 This is because they call defer_drop, which requires T: Sync.

Anyway, I think now we can close this issue. Thank you!

from sled.

spacejam avatar spacejam commented on May 5, 2024

@jeehoonkang awesome! I'm looking forward to pulling this in once that branch is merged into crossbeam-epoch!

from sled.

Related Issues (20)

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.