Kaffe and Native Threads
tony at magg.net
Mon Dec 1 20:45:14 PST 1997
John D. Gwinner wrote:
> Hmm ... do you have the book "Multithreading applications in Win32"? It's
> pretty good for a much better understanding of these issues. In any
> event, what about a mutex or a semaphore?
By Jim Beveridge and Robert Wiener? Yes. I was quoting
their solution ( Events) and I confirmed their findings about MS C library
signal implementation by inspecting library sources myself.
To quote them literally:
"After spending hours doing research, I can tell you with certainty
that there is no standard supported way in the Win32 API to throw
an excpetion into another thread. It is unfortunate because the effect
would be exactly what is needed."
> Dangerous, as if the target isn't waiting, the pulse can loose an event
> (depending on if you've got an auto-reset event).
I agree. I don't like this solution either.
> This does sound like a problem... you really don't want much of a wait,
> you really just want to check if you need to suspend at the end of a loop.
Yes, but which loop?
> Hmm ... maybe a mutex or a semaphore for 'Run' ... when the thread
> controller decides that it's time for another thread to run, it grabs the
> semaphore, and then other threads will block (as they can't get it)
> allowing the thread controller to unblock the proper thread?
Good idea worthy of further thinking. I hope I won't be alone :-)
> I haven't looked closely at the Kaffe threading since a while ago, when I
> had the most trouble with getting that to compile. Since then, it looks
> like Java has loosened it's licensing restrictions (re: the huge
> discussion we had a while ago) so I haven't investigate this yet. I'd
> still love to use Kaffe and Guava instead though!
Me too. BTW what loosening of license are you talking about?
Sun looks to me as expensive and elusive as it always was.
Licenses left to lawyers to understand and interpret when the
need arises. All I understood from discussion here is a sort of:
maybe they won't, maybe they are not so bad, I think they
are friends, etc.
> Cygnus ...
> I really wouldn't recommend this as a gut feeling.
I wouldn't mind using Cygwin.dll but my problem is that
I can not easily debug it. I would prefer to work with
Dev Studio and MSVC 5.0 debugger when debugging Kaffe.
That way I am confident I always know precisely what's
More information about the kaffe