Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6020779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:37:04+00:00 2026-05-23T03:37:04+00:00

I am writing an applicaation where more then one link list is shared among

  • 0

I am writing an applicaation where more then one link list is shared among threads. Operations on the linked list is as usual:searching,inserting,deleting,modifying node contents.
I came across ann implementation to keep the entire procedure of link list operation “thread-safe”. http://www.cs.cf.ac.uk/Dave/C/node31.html#SECTION003100000000000000000

But was wondering if I caan do it as follows:

lock(mutex)
  link list operation
unlock(mutex)

I.e I associate a mutex with each link list and use it as above whenever I start an operation

Would be gratefull for views

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:37:05+00:00Added an answer on May 23, 2026 at 3:37 am

    Depends. If your threads will mainly search through the lists without modifying them, it may be worthwhile to implement a reader/writer-lock. There’s no reason to prevent other threads from reading the information as long as none of them modifies it. If however, the most common operations involve modifying the lists or the information in them, there may not be much to gain, so a simple lock/do operation/unlock scheme should work just as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing an application that allows one to store images, and then tag
I'm currently writing an iPhone application that uses a UITabBarController with more than 5
I'm writing an application that on some stage performs low-level disk operations in Linux
this one is hard to explain! I am writing a python application to be
I'm learning C. I'm writing an application with multiple threads; I know that when
see i m writing one avi demuxer library. In which i have exported multiple
I am writing an application where one of the features is to allow the
I'm writing a java application which needs to perform an unusual login procedure. One
I am writing a web application that has a page that returns a list
When writing application code, it's generally accepted that premature micro -optimization is evil, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.