Semantics of shared
Walter Bright
newshound1 at digitalmars.com
Wed May 13 22:27:15 PDT 2009
Robert Jacques wrote:
> I don't see a place for "maybe shared" that isn't already handled by
> simply "shared".
I gave a flip and incomplete answer there.
I'm not sure there is even a point to a function that could handle both
shared and unshared with the same code. First of all, sharing is going
to need some sort of synchronization; you're going to try and minimize
the amount of code that has to deal with shared. I can't see trying to
run an in-place sort on a shared array, for example. Can you imagine two
threads trying to sort the same array?
You're going to want to approach manipulating shared data differently
than unshared.
More information about the Digitalmars-d
mailing list