[Tcl Java] JavaGetEnv + Threads = mo going insane

2000-08-07 Thread Mo DeJong
Ok, I just could not take it anymore so I rewrote JavaGetEnv. The old implementation used a method for JDK 1.1 and another completely different method for JDK 1.2. The methods were almost the same but still different. Needless to say, this was not a good situation at all. The new impl uses

[Tcl Java] Last(?) steps for an InterpCmd in Jacl

2000-08-07 Thread Christian Krone
Hello, yesterday I finally finished the implementation of Jacl' interp command. The new classes to add and the patches to apply to the CVS sources of Jacl (as checked out yesterday) can be found here: http://ME.IN-Berlin.de/~v12/krischan/Interp Some notes to former mails of Mo to this topic:

[Tcl Java] Improvements of Jacl's clock command

2000-08-07 Thread Christian Krone
Hello, yesterday I checked out the Tcl8.4 sources from the NetCVS and noticed, that the C implementation of the clock command had one improvement and one bug fix. The patch to incorporate these changes into Jacl can be found here: http://me.in-berlin.de/~v12/krischan/clock8.4.patch Greetings,

[Tcl Java] Re: JavaGetEnv + Threads = mo going insane

2000-08-07 Thread Jiang Wu
On Mon, 07 August 2000, Mo DeJong wrote: From section 3.2 in blendchanges.txt: load "tclblend", "tcl" .dll or .so (a) call "new Interp()" in Java invoke Java_tcl_lang_Interp_create() C function (b) calls JavaSetupJava() invoke Java_tcl_lang_Interp_init() C function (c) We

[Tcl Java] Re: TclBlend Patch 8/5

2000-08-07 Thread Mo DeJong
On 7 Aug 2000, Jiang Wu wrote: On Sun, 06 August 2000, Mo DeJong wrote: If I do 2 vwaits, then a single event is processed from the event loop, but that seems to be all. How did you do 2 vwaits? -- Jiang Wu [EMAIL PROTECTED] Did a vwait in the callback that was added to the queue

[Tcl Java] Re: JavaGetEnv + Threads = mo going insane

2000-08-07 Thread Mo DeJong
On 7 Aug 2000, Jiang Wu wrote: On Mon, 07 August 2000, Mo DeJong wrote: From section 3.2 in blendchanges.txt: load "tclblend", "tcl" .dll or .so (a) call "new Interp()" in Java invoke Java_tcl_lang_Interp_create() C function (b) calls JavaSetupJava() invoke

[Tcl Java] Re: TclBlend Patch 8/5

2000-08-07 Thread Jiang Wu
On Mon, 07 August 2000, Mo DeJong wrote: Did a vwait in the callback that was added to the queue in Java (see source code). Then did a normal vwait on the command line. I am going to try your example tonight. Is this what you mean by doing a normal vwait? Can you send me the exact

[Tcl Java] Re: TclBlend Patch 8/5

2000-08-07 Thread Mo DeJong
On 7 Aug 2000, Jiang Wu wrote: On Mon, 07 August 2000, Mo DeJong wrote: Did a vwait in the callback that was added to the queue in Java (see source code). Then did a normal vwait on the command line. I am going to try your example tonight. Is this what you mean by doing a normal

[Tcl Java] Re: TclBlend Patch 8/5

2000-08-07 Thread Mo DeJong
On 7 Aug 2000, Jiang Wu wrote: On Mon, 07 August 2000, Mo DeJong wrote: package require java set AQT [java::new AppendEventQueueThread [java::getinterp]] $AQT start set orig_numQueued [java::field $AQT numQueued] java::call AppendEventQueueThread queueVwaitEvent [java::getinterp]

[Tcl Java] Re: TclBlend Patch 8/5

2000-08-07 Thread Jiang Wu
From: Mo DeJong [EMAIL PROTECTED] java::call AppendEventQueueThread queueVwaitEvent [java::getinterp] Note: this will NOT block the C Tcl shell because you are just posting an event to be executed later. You have to use 'vwait' or 'update' here to force the event loop to run. The

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-07 Thread Jiang Wu
Yes, you are correct. I noticed this after doing more research into the notifier and event loop implementation in Tcl. Per thread event loop can be achieve in Java easily. But there are some outstanding questions: 1. In UNIX, TclBlend uses a pipe with non-blocking IO to wake up the Tcl event