digitalmars.D - associative arrays
- deadalnix (2/2) Jun 02 2013 Quick question, are they supposed to be stable ? Are they
- Walter Bright (3/5) Jun 02 2013 Declaring anything shared does not make it "thread safe". You still have...
- deadalnix (3/9) Jun 02 2013 Sure, but what is the goal we want to reach. Thread safe hash
- Jonathan M Davis (11/22) Jun 02 2013 I would be very surprised to ever see the build-in AAs doing that. Not o...
Quick question, are they supposed to be stable ? Are they supposed to be thread safe when shared ?
Jun 02 2013
On 6/2/2013 11:37 AM, deadalnix wrote:Quick question, are they supposed to be stable ? Are they supposed to be thread safe when shared ?Declaring anything shared does not make it "thread safe". You still have to synchronize, etc.
Jun 02 2013
On Sunday, 2 June 2013 at 18:55:15 UTC, Walter Bright wrote:On 6/2/2013 11:37 AM, deadalnix wrote:Sure, but what is the goal we want to reach. Thread safe hash table are know technology and can surely be implemented.Quick question, are they supposed to be stable ? Are they supposed to be thread safe when shared ?Declaring anything shared does not make it "thread safe". You still have to synchronize, etc.
Jun 02 2013
On Monday, June 03, 2013 04:13:21 deadalnix wrote:On Sunday, 2 June 2013 at 18:55:15 UTC, Walter Bright wrote:I would be very surprised to ever see the build-in AAs doing that. Not only are there all kinds of problems in their implementation, but making them synchronize would incur overhead which is unnecessary for most programs. If you want to use them in a shared context, then make them shared and protect them with mutex or synchronized blocks. That's the normal thing to do. And if you want one that does the synchronization automatically, then create a wrapper for the built-in AA which is synchronized. We may very well add that to std.container at some point, but the built-in AA implementation isn't going to function that way in and of itself. - Jonathan M DavisOn 6/2/2013 11:37 AM, deadalnix wrote:Sure, but what is the goal we want to reach. Thread safe hash table are know technology and can surely be implemented.Quick question, are they supposed to be stable ? Are they supposed to be thread safe when shared ?Declaring anything shared does not make it "thread safe". You still have to synchronize, etc.
Jun 02 2013