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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:39:03+00:00 2026-05-29T10:39:03+00:00

Suppose that thread Alpha is writing to variable A without locking. A second thread

  • 0

Suppose that thread Alpha is writing to variable A without locking. A second thread Beta is waiting for Alpha to terminate, then reads the variable A in turn.

Is it possible that the contents of A will not be fresh? Can memory writes be delayed beyond the thread lifetime? Won’t the standard mechanism of waiting for thread Alpha termination implicitly work as a memory barrier?

UPDATE 1

Are there any examples of waiting which does not include a memory barrier?

  • 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-29T10:39:04+00:00Added an answer on May 29, 2026 at 10:39 am

    Almost certainly (the API used to wait for thread termination would need to use memory barriers for its own purposes), but I think for a definitive answer you’ll need to talk about the specific threading API being used.

    For example, posix makes such a guarantee for pthread_join(): https://stackoverflow.com/a/3208140/12711

    And Win32 documents that it’s synchronization APIs to wait on an object (for example, a thread handle) impose memory barriers: http://msdn.microsoft.com/en-us/library/ms686355.aspx

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

Sidebar

Related Questions

Suppose that a group wants to encrypt some information, then share the encryption key
(Continued from this thread ) Suppose that I have the following view created: http://cl.ly/1USw/content
Let us suppose that I have a thread that consumes items produced by another
A question if I may. Lets suppose that my main thread creates 3 threads.
Suppose i create a thread that ,in some point, calls a function foo(). If
Let's suppose I have a thread that locks on an object reference Thread #1
Suppose a condition variable is used in a situation where the signaling thread modifies
Suppose, I declare a local variable in a CUDA kernel function for each thread:
Suppose that two tables exist: users and groups . How does one provide simple
Suppose that you have two huge files (several GB) that you want to concatenate

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.