[Mono-dev] Double check locking pattern in Mono? (was: Some notes from my use of Gengarme...)

knocte knocte at gmail.com
Tue May 13 10:58:20 EDT 2008

> On Apr 28, 5:53 pm, Sebastien Pouliot <sebastien.poul... at gmail.com>
> wrote:
>> On Mon, 2008-04-28 at 08:23 -0700, knocte wrote:
>> > (BTW, are we sure that Mono implements this the same way
>> > as .NET?).
>> This is indeed the right question.
>> The same issue was discussed on another thread (a bit more recent) and
>> it's something that needs to be validated with the runtime guys (I do
>> remember Zoltan asking me to change a double-lock, albeit a long time
>> ago, in CryptoConfig).
>> I'll a bit short on time this week (got a presentation to finish/present
>> in two days and stretched a bit my free time this weekend for the rule
>> day) but feel free to bring the discussion to mono-devel, I'll join in
>> later :-)
> Mmm, thanks for warning us Sebastien! I agree we should push this to
> mono-devel but, regardless of this runtime topic, come to think of it,
> we should change the rule anyway, because otherwise Gendarme would
> rely on a bug (if Mono doesn't implement this like .NET, it's a bug,
> because I guess it's included in the CLR spec). Besides, Gendarme is
> supposed to target any .NET implementation, right? And doing a double-
> check is just harmless in the case Mono doesn't mimic .NET's CLR (and
> maybe it's better to have your own code conformant to .NET standards,
> this way you won't have to modify it in the future when Mono gets
> fixed).

Hey, sorry for not having brought this to mono-devel until now, but I
was curious to the answer to the above. However, nobody has answered
but, anyway, today I've just seen a commit in the runtime that may be
related to this issue:


Zoltan, can we then consider that Mono mimics .NET in this aspect:?

Is there a bugzilla bug open for this?

FYI, the original thread:




More information about the Mono-devel-list mailing list