Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We have no such plans. The library is designed so that concurrency control is outside its scope. If I needed it for an application, I might consider using some application level code that looks like:

    bool CAS(db, key, oldvalue, newvalue) {
      lock some mutex;
      read key's value from db;
      bool result = (value == oldvalue);
      if (result) write key=>newvalue to db;
      unlock;
      return result;
    }
This should be not much slower than any hard-wired CAS we could provide from inside leveldb.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: