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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:24:08+00:00 2026-06-10T12:24:08+00:00

I was reading this section and the last paragraph stated that the example code

  • 0

I was reading this section and the last paragraph stated that the example code was not thread-safe. My question is: wouldn’t that help increase its randomness (i.e. if multiple threads were to concurrently execute those lines)?

  • 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-10T12:24:09+00:00Added an answer on June 10, 2026 at 12:24 pm

    PRNGs are carefully engineered (well, maybe not RANDU) to yield predictable and sufficiently randomly distributed results. They don’t have to be truly random, they just have to satisfy statistical quality tests, yield a large-enough period and be deterministic with the same seed.

    If you happen to use the generator from multiple threads simultaneously all those guarantees go down the drain. Most importantly you cannot have a reproducible result (which is extremely important in simulations). Then the state might change or perhaps you get the same number twice in different threads, those things.

    You definitely don’t want to go there. Create one PRNG per thread (preferrably with seeds that are linearly independent).

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

Sidebar

Related Questions

After reading this article on thedailywtf.com, I'm not sure that I really got the
I'm reading this article that compares XML to JSON, and in the comments section,
i've been reading some lisp code and came across this section, didn't quite understand
I was reading this article by Brian Goetz. Under the section Don't start threads
Reading Java Concurrency In Practice, there's this part in section 3.5: public Holder holder;
Reading this article http://support.microsoft.com/kb/813878 I have a question: Where can I get ipseccmd.exe for
While reading this class BitmapFactory I noticed that almost all methods inside are static.
After reading this question, I need to clear up some things. IQueryable<Customer> custs =
I was reading this section in the Android Dev Guide : here and I
I've been reading this section about static methods and about passing arrays by call-by-reference.

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.