Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Inconsistent results with keys on thread shared hashes

by Anonymous Monk
on Aug 03, 2022 at 10:42 UTC ( [id://11145916]=note: print w/replies, xml ) Need Help??


in reply to Inconsistent results with keys on thread shared hashes

Locks arent all ....Use an array? Here is food for thought Re^8: Multithreading, how to? ...
  • Comment on Re: Inconsistent results with keys on thread shared hashes

Replies are listed 'Best First'.
Re^2: Inconsistent results with keys on thread shared hashes
by izomiac (Novice) on Aug 03, 2022 at 19:12 UTC
    In this instance an array would be the better choice. I chose to complicate a simple part of my code to make a more complex part simpler. While I was debugging this glitch in my code I refactored and reimplemented the genetic sorting algorithm many times, and the current iteration uses a similar technique to what you linked (albeit they did it better, making me wish I'd seen that post earlier). It got to the point that I was absolutely confident that part of the code wasn't the problem, so I started recording the output from my simpler subroutines to track down where the inconsistencies were being generated. I will say, genetic sorting doesn't work all that great when your value function gives different results for the same input.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11145916]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-23 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found