Giter VIP home page Giter VIP logo

Comments (4)

manugoyal avatar manugoyal commented on July 17, 2024

It seems like the update_fn / upsert necessary functionality is pretty similar to the iterator functionality, so I'm thinking about a way to combine the two concepts. #32 asks for the same functionality for iterators.

from libcuckoo.

ldalessa avatar ldalessa commented on July 17, 2024

Ah, I read that issue and didn't realize it was basically the same thing. Yes, we want an update_fn that can conditionally erase an element based on its data. Like I said, simply allowing the lambda to return a boolean would be ideal for us. (uprase_fn?)

from libcuckoo.

MRYingLEE avatar MRYingLEE commented on July 17, 2024

A few light transaction functions have been added in my new pull request.
The most important functions include:

  1. find_fn/erase_fn/update_fn
  2. find_or_insert/update_or_insert/delete_or_insert
    update_insert is another implementation of upsert, which should have better efficiency than the current upsert.

The code and examples have been uploaded to my fork also, https://github.com/MRYingLEE/libcuckoo-transaction.

I think what I did is what you expected.

from libcuckoo.

manugoyal avatar manugoyal commented on July 17, 2024

The tip of future-master should now provide this functionality through erase_fn.

from libcuckoo.

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.