Hi Ali,
Thanks for the help, looks like synchronized blocks are what I
want.
I just found your book online the other day too, nice work!
Cheers,
Stewart
On 04/15/2013 11:06 PM, estewh wrote:
> Hi All,
>
> I have this bit of code like this:
>
> shared bool varInitialized = false;
> bool initVar() {
> bool ret;
> synchronized { ret = varInitialized;}
> return ret;
> }
>
> I know there are atomics and I am using them but I am curious abo
Hi All,
I have this bit of code like this:
shared bool varInitialized = false;
bool initVar() {
bool ret;
synchronized { ret = varInitialized;}
return ret;
}
I know there are atomics and I am using them but I am curious
about the above code. It compiles but I have no idea how safe it