Possible way to achieve lazy loading with const objects
Simen Kjaeraas
simen.kjaras at gmail.com
Mon Sep 26 07:44:29 PDT 2011
On Mon, 26 Sep 2011 02:19:29 +0200, Jonathan M Davis <jmdavisProg at gmx.com>
wrote:
>> Oh, and of course more stuff is need if you try to make this work across
>> threads.
>
>
> The threading issue is exactly why I suggested that objects which are
> constructed as shared automatically have the property called at the end
> of the
> constructor (to force initialization) and that an opCast to shared
> should be
> added which does the same (or if there's already one, then the call to
> the
> property function is added at the end of it). You should completely
> eliminate
> the threading issues that way.
True. I just chose to ignore that out of stupidity. :p
--
Simen
More information about the Digitalmars-d
mailing list