RE: JavaMemoryModel: More on C#

From: Boehm, Hans (hans_boehm@hp.com)
Date: Fri Jul 21 2000 - 13:53:28 EDT


In my opinion, this is just plain broken, even if we assume a uniprocessor
and outlaw all compiler optimizations. A finalizer generally has to affect
global state in order to be useful. The global state may be inside the OS
or in user space. In either case, the access requires some form of
synchronization to be safe.

This suggests that finalizers are run implicitly in the allocating thread,
which is dubious in a single-threaded world, and just does not work with
multiple threads.

Hans

> -----Original Message-----
> From: Bill Pugh [mailto:pugh@cs.umd.edu]
> Sent: Friday, July 21, 2000 7:49 AM
> To: javaMemoryModel@cs.umd.edu
> Subject: JavaMemoryModel: More on C#
>
>
> From some documentation on C#:
>
> Avoid all actions that would block the Finalize method
> including any thread
> synchronization operations.
>
>
> Sigh....
>
> I haven't seen anything in any of the documentation that indicates
> that Anders Hejlsberg realizes that visibility of reads/writes across
> threads is even an issue.
>
> Bill
> -------------------------------
> JavaMemoryModel mailing list -
> http://www.cs.umd.edu/~pugh/java/memoryModel
>
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:26 EDT