thread, threading; how to kill a thread?
I have limited experience with threaded apps and plenty with old style
forked heavyweight multi-processing apps.
Using Python 2.3.3 on a Redhat 7.x machine.
Wondering if there is a simple way from a main python program to kill
a running thread? I see with the 'threading' module the way daemonic
threads behave when the main program finishes.
But suppose we have a simple thread running a function like;
All I am trying to do is stop that thread immediatly from the main
program and i...To thread or not to thread
My app needs to check a number of things on the web. This can be done in the
I use idHTTP to pull data in. This process is broken down into small parts
and the subroutinen are called in the OnIdle handler of the main form.
I notice that sometimes idHTTP needs a considerable time to build the
connection/fetch the data and the application doesn't repond to user actions
during such periods.
To cope with this I have now implemented the web data fetching in a thread
with priority tpIdle. I think the problem of non-response has gone, ut it is
difficult to test.
Am...Thread or not thread
i read some document that say enabling threads (in Bind 9.x compiling), giv=
e less performance than disabling threads, in a 32 bit environment (with 2 =
cpu), using Bind DLZ (with Postgresql DB).
I found something here:
Do you suggest enabling threads with DLZ or not?
...thread or threads ?
For some time now, I've been checking out tcl, tk, tls and threads
Recently, my cvs went berserk (I passed it a subdirectory
with trailing slash for update, but I'm not sure if that
was really the reason), and instead of updating just that
directory, it checked out all modules.
Among these modules was "thread".
I checked for what was more recent, and it looked like
thread had more recent checkins than threads.
But "thread" doesn't even configure:
> ../../../cvs/sourceforge/thread/configure checking for correct TEA configuration... ok (T...threading a thread
I have a program written in Python that checks a class B network (65536
hosts) for web servers. It does a simple TCP socket connect to port 80
and times out after a certain periods of time. The program is threaded
and can do all of the hosts in about 15 minutes or so. I'd like to make
it so that I can check for other open ports (instead of just port 80)
and I'd like to thread the port checks as well.
Right now I'm just prototyping and the threaded hosts portion works very
well for my needs. I'd just like to add a threaded ports check and
wanted to know if anyone had don...To thread or not to thread
I was recently reading an article on threading in python and I
came across Global Interpreter Lock,now as a novince in python I was
1.Is writing a threaded code in python going to perform well than a
normal python code.If so on what basis can it performance be measured.
2.Is writing a threaded code in python better than a code written in
C/C++ using PTHREADS.
If someone can comment on these questions, it would be great.
On 2005-07-28, Sidd <email@example.com> wrote:
> I was recently reading an article on threading in python and I
> came across Glo...Thread or threads.
thinking of writing a perl script with concurrent abilities.
which Module is better 'Thread' or 'threads' ?
On Mon, 30 Jun 2008 05:24:19 -0700 (PDT), nadav <firstname.lastname@example.org>
>thinking of writing a perl script with concurrent abilities.
>which Module is better 'Thread' or 'threads' ?
Thread (capital T) is obsolete.
I'm not really a human, but I play one on earth.
> thinking of writing a perl script with concurrent abilities.
> which Module is bette...To thread or not to thread ?
The threads of discussion about threads have been enlightening in exposing
some of the low level issues which could possibly affect MT code and,
more importantly, served also to bring awareness to the unsuspecting (me
for one). It leaves me wondering if writing MT code is even to be pursued
at this point in time, or at least "where's the guidebook to read is that
facilitate the writing of MT code without engaging compiler-level
gotchas?". Can the low level issues be dealt with in the short term by
following certain rules, perhaps platform-specific ones, or is robust MT
code ...another thread on Python threading
I've recently been working on an application which does quite a bit
of searching through large data structures and string matching, and I
was thinking that it would help to put some of this CPU-intensive work
in another thread, but of course this won't work because of Python's
There's a lot of past discussion on this, and I want to bring it up
again because with the work on Python 3000, I think it is worth trying
to take a look at what can be done to address portions of the problem
through language changes.
Also, the recent hardware trend towards multicore proces...thread::release [thread::id] of main thread
I would like to put this into discussion:
In the main thread write:
package re Thread
Shall a scripting language take precautions for making such errors and throw an error? or shall it simply do what the user requests?
I already mentioned this at sourceforge but didn't write an explicit bug-report.
...threads within a thread
I have a program that uses threads to quickly check class B networks (65,536)
hosts for public web servers. It works great. I'd like to check for other
servers as well. Basically, I've got the hosts threaded. Now, I'd like to
thread the ports so that while the hosts are being probed concurrently that
ports on the hosts could be probed concurrently as well. It might look like
I can demonstrate actually code (with only threaded ho...Sub thread and Thread ?
Can I build 2 sub threads in another thread? which means:
call thread A
call thread A1;
call Thread A2;
Thanks for any comments.
> Hi, all:
> Can I build 2 sub threads in another thread? which means:
If in the pseudo code below 'call' means 'create' then yes, most thread APIs
allow threads to create threads.
> call thread A
> Thread A
> call thread A1;
> call Thread A2;
> Tha...threads creating threads ..
I create a thread X using pthread_create().
thread X then creates thread Y using pthread_create().
thread X then completes it's operations and returns thus terminating
the thread X.
What happens to thread Y? I need to have thread Y continue to run
after thread X has terminated.
I haven't coded this yet, just need to know in advance if there is
anything i need to do. My application is already threaded using
pthreads, this is a modification needed to handle some extra
I'm using codwarrior 8.3 on mac osX (10.3) and pth...Thread within a thread
Is it possible to call a thread (pthread) from within a thread
If I correctly pthread_join() the new thread from the calling thread,
does it make good design sense ?
<email@example.com> wrote in message
> Is it possible to call a thread (pthread) from within a thread
> invocation ?
> If I correctly pthread_join() the new thread from the calling thread,
> does it make good design sense ?
Well, perhaps it makes 100% complete sense for your particular application;
I need mo...