On 4/24/07, Tim Ellison <[EMAIL PROTECTED]> wrote:
Yang Paulex wrote:
> I just found by accident that Harmony's sun.misc.Unsafe in suncompat.jar
> is, actually, not so compatible.
> ...
As you know, Unsafe is not part of the spec, so I expect it was an
oversight. I see no harm in changing the signature of unpark to be more
compatible. We will implement the other other methods as we need them.
Regards,
Tim
In the IBM VM, we assume that Unsafe.unpark() is always passed a
Thread. The incoming object is not type-checked. This assumption was
valid in the past and was probably made for performance reasons.
It would be safer (from my point of view, at least) to leave the
signature as unpark(Thread). I don't think this would cause binary
incompatibility, since the native declaration would be unpark(jobject)
in any case.
If j.u.concurrent is passing non-Thread objects to unpark(), this
would be a much more significant problem for us.
--
Angela Lin, IBM Ottawa Software Lab