[Mono-dev] Finalizers in CriticalHandle

Miguel de Icaza miguel at novell.com
Thu Jan 20 12:29:40 EST 2011


Hello Dick,

   Please apply to both 2-10 and master branches.

   Thanks for tracking this down.

Miguel

On Thu, Jan 20, 2011 at 11:15 AM, Dick Porter
<dporter at codicesoftware.com> wrote:
>
> On 17 Jan 2011, at 6:00PM, Rodrigo Kumpera wrote:
>>
>> I'm not sure what the defined behavior is on this case, MSDN is not always
>> accurate and we
>> need to be as compatible with MS as possible.
>>
>> Could you please write a test case, and if the behavior you suggest is
>> correct, send a patch
>> which includes both the fix and the test case so we can move forward?
>
> Please see attached test case and diff.
>
> Test case on windows:
>
> C:\Documents and
> Settings\Administrator\Desktop\CriticalHandle\CriticalHandle\bin\Debug>CriticalHandle.exe
> Handle 8 was released!
> Handle 3 was released!
> Handle 2 was released!
> Handle 1 was released!
> Handle 0 was released!
> Handle 7 was released!
> Handle 6 was released!
> Handle 5 was released!
> Handle 4 was released!
>
> Handle 9 was released!
>
> C:\Documents and
> Settings\Administrator\Desktop\CriticalHandle\CriticalHandle\bin\Debug>
>
>
> Test case on unpatched mono, git master as of this afternoon:
>
> [dick at hagbard /tmp] [ 3:53PM] Mono HEAD
> :; mono CriticalHandleTest.exe
>
>
> [dick at hagbard /tmp] [ 3:53PM] Mono HEAD
> :; mono-sgen CriticalHandleTest.exe
>
>
> [dick at hagbard /tmp] [ 3:54PM] Mono HEAD
> :;
>
>
> Test case on patched mono:
>
> [dick at hagbard /tmp] [ 4:00PM] Mono HEAD
> :; mono CriticalHandleTest.exe
> Handle 7 was released!
> Handle 1 was released!
> Handle 6 was released!
> Handle 0 was released!
> Handle 5 was released!
> Handle 4 was released!
> Handle 3 was released!
> Handle 2 was released!
> Handle 8 was released!
>
> Handle 9 was released!
>
> [dick at hagbard /tmp] [ 4:00PM] Mono HEAD
> :; mono-sgen CriticalHandleTest.exe
> Handle 8 was released!
> Handle 7 was released!
> Handle 5 was released!
> Handle 6 was released!
> Handle 3 was released!
> Handle 4 was released!
> Handle 2 was released!
> Handle 0 was released!
> Handle 1 was released!
>
> Handle 9 was released!
>
> [dick at hagbard /tmp] [ 4:00PM] Mono HEAD
> :;
>
>
> - Dick
>
>
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>


More information about the Mono-devel-list mailing list