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

  • SEARCH
  • Home
  • 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 8084373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:46:36+00:00 2026-06-05T17:46:36+00:00

I am developing a multi-threaded socket listener (daemon) . I succesefully implemented multi threading

  • 0

I am developing a multi-threaded socket listener (daemon) .

I succesefully implemented multi threading using pthread library.

When the device connects to the daemon it send’s an identification number my question is:

How to store that identification number for every thread so when i receive some data from that device to know it’s ID.

In delphi is something called threadvar ( a variable that is allocated for every thread ).If that is not possible is there a library I can use to store lists? I am not planing to reinvent the weel ( eg make my own linked list )

I use GNUCC on Linux Mint

  • 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-06-05T17:46:37+00:00Added an answer on June 5, 2026 at 5:46 pm

    It would be easier to answer if we had you code but :

    • If you want a thread local variable with pthread, just allocate it on the stack of the function
      which is run in a thread (This thread local variable would be a pointer to your list of strings).
    • You can use Glib which has singly and doubly linked lists to store your strings. Make sure you free the list at the end of the function which is run in a thread
    • You can pass data to the function which will is threaded through a void * pointer (It is unclear if you need to do that though)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a multi-threading application, which is deadlocking. I am using Visual C++
I am developing an application using multi-touch in AndEngine. To get the coordinates of
I'm new to magento. Currently i'm developing two ecommerce sites using multi-store option in
I'm developing a multi-threaded Java program use different assertions throughout the code and run
I'm developing a long-running multi-threaded Python application for Windows, and I want the process
I'm developing a multi-threaded ASP.NET 3.5 application, during working with some file, I'm getting
I'm developing a multi threaded Unix application in C. Is there a simple way
I'm developing application using VC++ 6. I have a 3rd party DLL. This library
Im developing a multi-threaded application in which different threads are required to update the
For my university class we are developing a multi-threaded Blackberry application which allows us

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.