Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tcl and threading

5 views
Skip to first unread message

Q X

unread,
Feb 8, 2003, 11:42:45 PM2/8/03
to
Hello all,

I am interested in implementing a threaded windows application that
communicates with many sockets and serial ports. I was wondering if
anyone can comment on how well TCL 8.4/tk (on windows) is suited for
this.
I've also been looking for a tcl 8.4/tk implementation that was built
with threading enabled without having any luck (it doesn't appear easy
to build my own). Anyone know where I can download one?

Help is much appreciated.

Jeffrey Hobbs

unread,
Feb 9, 2003, 4:03:47 AM2/9/03
to
Q X wrote:
> I am interested in implementing a threaded windows application that
> communicates with many sockets and serial ports. I was wondering if
> anyone can comment on how well TCL 8.4/tk (on windows) is suited for

Tcl/Tk is well suited for this, and has no requirements for threads
in such a situation - the event loop suffices.

--
Jeff Hobbs The Tcl Guy
Senior Developer http://www.ActiveState.com/
Tcl Support and Productivity Solutions

Cameron Laird

unread,
Feb 10, 2003, 7:31:55 AM2/10/03
to
In article <3E461988...@ActiveState.com>,

Jeffrey Hobbs <Je...@ActiveState.com> wrote:
>Q X wrote:
>> I am interested in implementing a threaded windows application that
>> communicates with many sockets and serial ports. I was wondering if
>> anyone can comment on how well TCL 8.4/tk (on windows) is suited for
>
>Tcl/Tk is well suited for this, and has no requirements for threads
>in such a situation - the event loop suffices.
.
.
.
I'm going to repeat this, because it so often happens
that newcomers to Tcl don't understand this explana-
tion.

Do you want to thread with Tcl? Tcl can do that; but
NOT in the standard distribution. You have to get a
Tcl processor built for threading. It's not hard to
do this, but it's not the default.

Do you want to communicate with many sockets and serial
ports? Standard Tcl has a way to do this that is
BETTER than threading. As Jeff summarizes, "the event
loop suffices".

I summarize: your first job is to decide what your
true requirement is. Is threading essential to you,
or just a means to an end?
--

Cameron Laird <Cam...@Lairds.com>
Business: http://www.Phaseit.net
Personal: http://phaseit.net/claird/home.html

lvi...@yahoo.com

unread,
Feb 10, 2003, 7:46:27 AM2/10/03
to

According to Cameron Laird <cla...@phaseit.net>:
:I'm going to repeat this, because it so often happens

:that newcomers to Tcl don't understand this explana-
:tion.
:
:Do you want to thread with Tcl?

To get a base Tcl library built for threading, one can either download
a distribution specifically built for threading, or one can download
the standard source code distribution, along with the extension designed
to make programming with threads easier, and then build these for yourself.

--
Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ >
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
<URL: mailto:lvi...@yahoo.com > <URL: http://www.purl.org/NET/lvirden/ >

Q X

unread,
Feb 10, 2003, 9:02:43 AM2/10/03
to
Thanks for your reply Jeffrey.
I'm not exactly clear how the event loop suffices as a replacement for
threading. Could you (or anyone) please explain further or refer me
to some sample code?


Jeffrey Hobbs <Je...@ActiveState.com> wrote in message news:<3E461988...@ActiveState.com>...

Michael Schlenker

unread,
Feb 10, 2003, 9:47:24 AM2/10/03
to
Q X wrote:
> Thanks for your reply Jeffrey.
> I'm not exactly clear how the event loop suffices as a replacement for
> threading. Could you (or anyone) please explain further or refer me
> to some sample code?
>
Some starters on the topic:
http://mini.net/tcl/1904
http://mini.net/tcl/489

Some example code for non-threading network servers
http://mini.net/tcl/8301
http://mini.net/tcl/1757

A http daemon with or without threading
http://mini.net/tcl/tclhttpd

Michael Schlenker

David Gravereaux

unread,
Feb 10, 2003, 3:45:32 PM2/10/03
to
qxz...@yahoo.com (Q X) wrote:

>I've also been looking for a tcl 8.4/tk implementation that was built
>with threading enabled without having any luck (it doesn't appear easy
>to build my own). Anyone know where I can download one?

http://sourceforge.net/project/showfiles.php?group_id=1616&release_id=120053
--
David Gravereaux <davy...@pobox.com>
[species: human; planet: earth,milkyway(western spiral arm),alpha sector]

0 new messages