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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:14:20+00:00 2026-06-08T07:14:20+00:00

I was wondering why reading from memory is not thread-safe. Among what I’ve seen

  • 0

I was wondering why reading from memory is not thread-safe. Among what I’ve seen so far, inter alia this question, reading from memory does not appear to be thread-safe.

I’ve been coding in Python for a while and now getting into C++. I’ve never heard that reading in Python is not thread-safe.

Please correct me if I’m wrong, but if not, please tell me why reading from memory is not thread-safe.

  • 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-08T07:14:21+00:00Added an answer on June 8, 2026 at 7:14 am

    Reading is thread safe, no problems….. until something writes to the location you’re reading from, and then… well, hopefully you’ll read before the data was changed, or read after the data was changed (in these cases, no worries), but sometimes, just when you really don’t want it, you’ll read half-way through the write and then you’ll get compete garbage data.

    The way to mitigate this is to ensure that you only read either before or after any writes, which requires you to check that a write is occurring and thus use a synchronisation lock of some sort. This makes things slower though, as you’re obviously checking the lock and then reading instead of reading. If you’re working with primitive data types (an int for example) then you can use a CPU synchronisation to speed this up dramatically.

    As fr Python, chances are python data is always synchronised for you by the language runtime, if it isn’t then you will get the same thread read problems sooner or later. (quick google says yes, Python will suffer the same problems is you’re not careful)

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

Sidebar

Related Questions

Reading some posts from Jimmy Boggard and wondering - how exactly is it possible
I was reading litb's question about SFINAE here and I was wondering exactly what
I'm wondering how Android's implementation of SQLite handles long Strings. Reading from online documentation
Basically I have a thread reading from c++ std::istream using istream& getline ( istream&
After reading http://www.pragprog.com/magazines/2010-03/javascript-its-not-just-for-browsers-any-more I'm wondering which is the best IDE to develop server-side javascript
After reading Jeff's blog post and being fairly new to GUI programming, I'm wondering
I was reading about inverse = true in one-to-many relation and was actually wondering
I'm currently reading Rails 3 In Action. There is code that I was wondering
I was just reading abit about JMS and Apache ActiveMQ. And was wondering what
I am wondering what the difference is between release and dealloc? After reading, the

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.