This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: why I was seeing exceptions thrown across threads -- a detailed explanation


>>>>> "Adam" == Adam Megacz <gcj@lists.megacz.com> writes:

Adam> I've been toying with the idea of doing stuff like this for
Adam> threads (assuming you can arrange for the OS can send you a
Adam> signal or interrupt every n milliseconds, which should be
Adam> possible even on DOS or PalmOS). The neat part about this is it
Adam> gets you "up and running" with a new port very quickly, and then
Adam> your only concern is improving performance by coding
Adam> replacements for the fallback implementations.

When I first wrote the thread code for libgcj, I used (a modified
version of) quickthreads, a cooperative thread package based on setjmp
(plus some small assembly hacks).  This was more convenient for
debugging, because I didn't need a thread-aware debugger; in fact, I
could examine the state of the thread system itself very easily.  This
code was never made public though, partly because we never finished
it.  For instance, with our quickthreads code, I/O always blocked all
the threads.

So, this is possible.  It is probably only really useful in unusual
circumstances though.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]