Threads is one thing. My list of things that were added to Java 5 are things that make threads easy to use for specific problems. My point was that these just appeared in Java 5! So AOLserver had a ten year head start. But the way threads work in AOLserver and Tcl makes programming with threads much easier than in languages like Java or C#. There are two important differences:
1. Java and C# combine data and methods into objects. So the orginal synchronization keyword in Java was like a huge critical section (but I have heard actually worse). In AOLserver, shared data is data only. Then there is an API which uses a mutex/condition var to synchronize access. Critical sections are only used when there is the potential of a recursive call using the same mutex/condition. I think there is only one in AOLserver for the master lock. 2. In Tcl the 'object' is the interp state. Only occasionally do these objects have to interact with other interps or threads or global shared resources. This makes objects bigger, but the programming model is vastly simplified. AOLserver has the effect providing a framework for these objects to interact locally and across a network. tom jackson On Monday 14 April 2008 07:47, Jim Davidson wrote: > True -- the original threading in AOLserver 2.0 way back in 1995 (yes, > 1995) was based on a thread-safe hacked Tcl 7.3. I can't recall where > I got it -- I think someone at UCB did the work. We later hacked Tcl > 7.4 and 8.1 on our own before enough support was in the Tcl core and > we were ready to give up on "ns_share" which was a significant hack > that couldn't reasonably be brought forward. > > The integration still isn't perfect and AOLserver isn't built directly > on Tcl threads, maintaining it's "nsthreads" library which works well > enough with Tcl (differences in how thread-specific data are handled > is one area of divergence). Today nsthreads is a thin wrapper on > Posix or Win32 threads but in the past it was a bit more involved > (AOLserver pre-dates the final Posix thread spec). > > -Jim > > On Apr 12, 2008, at 4:26 PM, Jeff Hobbs wrote: > > Andrew Piskorski wrote: > >> On Fri, Apr 11, 2008 at 02:11:30PM -0700, Tom Jackson wrote: > >>> It is hard to say if these newer languages (C# and MONO) have > >>> these features, probably VB and Python don't: > >>> > >>> task scheduling: ns_schedule_proc, ns_job > >>> concurrent collections: nsv arrays, ns_share, static vars (config > >>> structure) > >>> atomic variables: nsv arrays > >>> synchronizers: ns_mutex, ns_cond, etc. > >> > >> Incidentally, those aren't so much language features, they're more > >> features of the AOLserver/Tcl API and environment. "Tcl" didn't have > >> nsv_* or ANY of the cool stuff above until Jim Davidson and crew > >> added > >> them to AOLserver sometime c. the mid 1990's, after all... > > > > Jim and crew deserve much credit for the very advanced state of > > Tcl's threading capabilities, but he was by no means the first or > > only person doing mt tcl. There were a few different attempts from > > various people for various reasons. It was just the AOL guys that > > had the most complete and worked with the core guys at the time for > > integration. > > > > Jeff > > > > > > -- > > AOLserver - http://www.aolserver.com/ > > > > To Remove yourself from this list, simply send an email to > > <[EMAIL PROTECTED] > > > > > with the > > > > body of "SIGNOFF AOLSERVER" in the email message. You can leave the > > Subject: field of your email blank. > > -- > AOLserver - http://www.aolserver.com/ > > To Remove yourself from this list, simply send an email to > <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the > email message. You can leave the Subject: field of your email blank. -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.