[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Jiang Wu
> -Original Message- > From: Mo DeJong [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 09, 2000 5:14 PM > To: [EMAIL PROTECTED] > Subject: [Tcl Java] Re: TclBlend Initialization Mutex > > > Yes, they may be fixed in the future. Though I can't stop >

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Mo DeJong
On Wed, 9 Aug 2000, Jiang Wu wrote: > > They need to be fixed. A threaded version of Tcl and a stub enabled > > extension will need to be the "minimum requirement" if you want to > > use Tcl Blend. > > Yes, they may be fixed in the future. Though I can't stop working waiting > for them to be fi

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Jiang Wu
> -Original Message- > From: Mo DeJong [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 09, 2000 4:14 PM > To: [EMAIL PROTECTED] > Subject: [Tcl Java] Re: TclBlend Initialization Mutex > > > Having to keep two separate versions of Tcl around is just > no

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Mo DeJong
> This seems to be the minimum requirement for using any extension in a > threaded program. Like using Tcl library (an extension) in a JVM (a > threaded program). Or are you saying that threaded application like Java or > threaded-Tcl should never use these extensions? I think the "minimum requ

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Jiang Wu
> -Original Message- > From: Mo DeJong [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 09, 2000 3:32 PM > To: [EMAIL PROTECTED] > Subject: [Tcl Java] Re: TclBlend Initialization Mutex > > > Right now, I am experimenting with using -D_REENTRANT (but witho

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Mo DeJong
On Wed, 9 Aug 2000, Jiang Wu wrote: > > -Original Message- > > From: Mo DeJong [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 09, 2000 1:34 PM > > To: [EMAIL PROTECTED] > > Subject: [Tcl Java] Re: TclBlend Initialization Mutex > > > >

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Jiang Wu
> -Original Message- > From: Mo DeJong [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 09, 2000 1:34 PM > To: [EMAIL PROTECTED] > Subject: [Tcl Java] Re: TclBlend Initialization Mutex > > Con: > Non-thread safe extensions may have problems under Unix. It

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Mo DeJong
On Wed, 9 Aug 2000, Scott Stanton wrote: > Mo DeJong said: > > It sure would make life easier if we just required Tcl > > threads to use Tcl Blend. The notifier thing would go > > away because we could count on threads being there. > > I'm all in favor of this. As the threaded version of Tcl

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-09 Thread Scott Stanton
Mo DeJong said: > It sure would make life easier if we just required Tcl > threads to use Tcl Blend. The notifier thing would go > away because we could count on threads being there. I'm all in favor of this. As the threaded version of Tcl becomes more stable, I'd like to see it become the

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-08 Thread Jiang Wu
Date: Tue, 8 Aug 2000 21:15:22 -0700 (PDT) > To: [EMAIL PROTECTED] > Subject: [Tcl Java] Re: TclBlend Initialization Mutex > Resent-From: [EMAIL PROTECTED] > Resent-Date: Tue, 8 Aug 2000 21:15:52 -0700 (PDT) > > On Tue, 8 Aug 2000, Jiang Wu wrote: > >> Darn! With probl

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-08 Thread Mo DeJong
On Tue, 8 Aug 2000, Jiang Wu wrote: > Darn! With problems like this, does it mean that there is no safe way of > using a non-threaded Tcl in a JVM because the JVM is threaded by default. > The JVM is going to allocate one thread to execute non-threaded Tcl code. > Tcl tries to access system glob

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-08 Thread Jiang Wu
> -Original Message- > From: Mo DeJong [mailto:[EMAIL PROTECTED]] > > > > used is non-threaded, version 8.3.1. Can there be something > > bad about using "errno" from multiple threads? > > Under Solaris, errno becomes a function that returns a thread > local variable when you compile wit

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-08 Thread Mo DeJong
On 8 Aug 2000, Jiang Wu wrote: > After spending some hours in gdb tracing the program, it seems that the problem >occurs in tclUnixChan.c:FileInputProc() line 380: *errorCodePtr = errno; > > 1 byte is written to a non-blocking Tcl file channel. Then 1 byte is successfully >read from the chan

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-08 Thread Jiang Wu
On Tue, 08 August 2000, Scott Stanton wrote: > Thanks for the information. It seems that multi-threaded Tcl already implemented some cross-platform thread notification, maybe TclBlend should use something like Tcl_ThreadAlert() to wake up the event loop. But this function is not available fo

[Tcl Java] Re: TclBlend Initialization Mutex

2000-08-08 Thread Scott Stanton
Jiang Wu said: > 1. In UNIX, TclBlend uses a pipe with non-blocking IO to wake up the Tcl > event loop. If there are multiple event loops in several threads, will a > single pipe based IO trigger all event loops to wake up? In the threaded version of Tcl, there are two distinct types of eve

[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 l