Sign in to follow this  

Lockless Queues

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im having a little trouble sorting out what a lockless queue is and when to use it. What i want to know is: * is it a way to make variable accessing safe on any thread? For any purpose? Or is it just a normal stl queue that is lock-less for storing information? * when using it, do i have to push every variable that i want to be threadsafe into the queue when i want to modify the variable? * or, do i have it all wrong? Please enlighten me. Lordcorm

Share this post


Link to post
Share on other sites
Without any further context, a lockless queue is a queue container that has been made threadsafe by using a lockfree algorithm, ie. one that uses special CPU instructions (CAS or similar) to avoid locking a thread (like a critical section or mutex would do). This allows for significant performance increases if many threads try to access the queue concurrently.

It doesn't mean anything more than that.

Share this post


Link to post
Share on other sites

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this