Testing some singleton implementations

Cecil Ward d at cecilward.com
Thu Feb 27 16:29:48 PST 2014


On Friday, 7 February 2014 at 20:09:29 UTC, Stanislav Blinov
wrote:
> There's a lot more to these singletons than meets the eye.
>
> - It would seem that such usage of raw MemoryOrder in 
> AtomicSingleton would be wrong (e.g. return to acq/rel is in 
> order, which should not pose any performance issues on X86, as 
> Sean mentioned).
>
> - The instance references should be qualified shared.
>
> This needs more serious review, even if only for academic 
> purposes. I'll see what I can come up with :)
> In the meantime, if anyone has anything to add to the list, 
> please chime in!

Hi Martin, Sean, Stanislav et al

I would quite like to code-review atomics.d and maybe think about
improving the documentation and adding a few comments, especially
for the purposes of knowledge capture in this sticky field.

Would that be ok, in principle?

There are a few rough edges here and there _in my very unworthy
opinion_, and the odd bit that doesn't look quite right somehow
especially in the x64 branch. If I could even find the odd bug
then that would be good. Or rather bad.

A big amount of work has clearly gone into this module. So, many
beers to Sean and others who put their time into it. Research can
be quite a pig too on a project of this kind, I would imagine.

There is quite a list of things that I'm currently unclear about
when I read through the D, and this might mean me whimpering for
help occasionally..?

Best,

Cecil.


More information about the Digitalmars-d mailing list