Code Monkey home page Code Monkey logo

Comments (4)

Amanieu avatar Amanieu commented on July 19, 2024

What are you trying to do with the raw locks? You should have everything that you need with the normal Mutex and RwLock types. You can do anything that the raw API can with Mutex<()> and Mutex::force_unlock.

The lock_api is primarily intended for people implementing different lock types that are not based on parking_lot, such as spinlocks and using Linux futexes directly.

from parking_lot.

kvark avatar kvark commented on July 19, 2024

I'm trying to implement my own concurrent map (https://pastebin.mozilla.org/9089970) that is generic across lock_api traits. In order to actually use it, or even just test it, I need to have an implementation of RawRwLock, of which I only know parking_lot's one. Obviously, using Mutex<()> will no longer be generic across raw lock implementations.

from parking_lot.

Amanieu avatar Amanieu commented on July 19, 2024

Added RawMutex and RawRwLock in 0.6.3.

from parking_lot.

kvark avatar kvark commented on July 19, 2024

from parking_lot.

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.