classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cleanly defining the VM interface


From: Archie Cobbs
Subject: Re: Cleanly defining the VM interface
Date: Mon, 14 Apr 2003 07:53:15 -0500 (CDT)

David Holmes wrote:
> The actual class initialization process, as defined by the JVMS and
> JLS, has a slight bootstrapping problem that seems to be left to the
> VM to resolve. To initialize a class you must first lock its Class
> object. But you can't have a Class object without creating one, and

Yep, I forgot to mention that in my recipie.. I had to modify class
initialization to not try to lock the Class object if it doesn't exist
yet.. in my case that automatically avoids the "missing thread" problem
as well...

> My main problem with initialization is getting to a point where I can
> bind the initial java.lang.Thread object to the "main" thread, as soon
> as possible without invoking too many other initializers. Class
> initialization inherently uses synchronization and that's a bit tricky
> without a current thread. Basically, you either need to allow for and

In my case, you always have a current thread, which is an internal
C structure. You don't need to bind it to a java.lang.Thread instance
until somebody calls Thread.currentThread(). This doesn't happen until
much later.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]