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 8337215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:14:16+00:00 2026-06-09T04:14:16+00:00

I have to design an app that reads UDP data off the local net

  • 0

I have to design an app that reads UDP data off the local net and stores the data in a Current Value Table (CVT).

Then, a separate thread will come along and read the values out of the CVT, massage them, and send them out over UDP. CVT entries will consist of individual scalars like floats and ints.

My question is, how much mutual exclusion do I need to protect updating/reading from the CVT?

Put another way, if I have a thread writing to an 32bit int and another thread reading from that int, do I need to employ a mutex for it?

I don’t care if the reader thread doesn’t get the absolute latest value stored, I’m just concerned about trying to read that location WHILE it is being changed. I know the keyword “volatile” has uses for this scenario in Java, but it doesn’t do the same thing in C++.

  • 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-09T04:14:18+00:00Added an answer on June 9, 2026 at 4:14 am

    A lot here depends on what sort of platform you’re using to support the threading. If you have atomic types available, you can just use those. Otherwise, yes, you’re pretty much stuck with a mutex (of some sort — many platforms have more than one type).

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

Sidebar

Related Questions

I have an app that allows the user to choose an image, at design
i have a design issue regarding sending user data from a mobile phone app
I have a simple app that reads internet resource and displays the information in
I'm trying to design a basic ORM for a data app that I'm working
I'm trying to design my app's interface in IB using a storyboard and have
I am creating an App with following design: I have a UITableView with custom
I have a simple question. I am trying to design a simple Android app,
I have a design for a page that uses 3 types of audio and
I'm writing an Android app that contains a contact list. The design required me
i have a question that is more design and architecture related. I am coming

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.