473,797 Members | 3,204 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does thread remain AbortRequested?

I have a second thread in which I call t.abort() from the parent thread. I
see "t"s state as AbortRequested. It stays this way for some time. Under
which conditions will a thread remain this way?

The sub procedure that "t" calls is an inifite loop with code inside. Near
the end of each interation, this sub() will call currentthread.s leep(x).
That works fine. I imagine the parent thread can't abort the child thread,
"t", until the inifinite loop finishes, which it never will.

If I request a t.suspend() or t.sleep() from the parent thread then
t.abort(), does that allow the thread to abort or do I need to interrupt the
thread?

Thanks,
Brett
Nov 21 '05
10 4017
Brett,

On a true single processor is never something executed the same time
everything is sequential. (A hyperthreading processor is in fact acting as a
dual processor). That is the reason that I write always in this newsgroups
that with multithreading you can only win time when there are stops in the
delivery of external data (and that has not as reason again own processor
actions).

Good samples to win time with multithreading can be downloading from more
sites. Direct printing to (a) printer(s).

In all other situations multithreading will cost more time because of the
fact that multithreading has to be processed itself.

When there are non dependent processes (what is quit seldom in
dataprocessing, however think about advantage games) than can it be as well
help to shorten time.

Just my thought,

Cor
Nov 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
2967
by: Ken Godee | last post by:
module1 calls a function in module2 module2 starts a thread that calls a function in module3 and then returns to module1 thread finishes and I need the return value from the thread to use in module1 where program flow is continuing. err, I hope I explained that well enough?
5
2720
by: Jon Perez | last post by:
Running the following under Linux creates 3 processes instead of 2. Once the started thread exits, 2 processes still remain. Why? import thread from thread import start_new_thread def newthread(): print "child"
4
6208
by: Daylor | last post by:
in win32 process , when u create new process,u have new main thread. i know,appDomain r logical procces,that exists in 1 win32 process. the q: is there way to create second appDomain (the first 1 is the defualt appDomain) with his new ("main") thread ? if not ,what is the easy and clear way to create new thread on the new appDomain ?
4
7393
by: Stephan Steiner | last post by:
Hi I'm having some weird threading issues.. almost at random, if I dare change a line of my code, the shutdown sequence gets messed up. I'm using a thread to receive data from the network, that I suspend and resume whenver needed. In order to properly shut down the program every thread has to be aborted. So, I override OnClosing(CancelEventArgs e) in my main GUI program, and have it perform the following on the thread: if...
4
1098
by: Ivan | last post by:
Hi All, my question is how to teminate a running thread... it sounds simple but in fact i 'm having problem with it firstly, i create a new thread (refer to follow example code) and start it on form load once the form button on clicked... i try terminate the thread... but an exception was catched...
11
6061
by: Michael Moreno | last post by:
Hello, I have a C# server which has 4 worker threads running all the time. When I let the server runs for several hours, for some reasons the CPU usage of the application will shoot to 100% and remain there. I would like to find out which thread(s) is/are the source of the problem. Would you have any idea on how to tackle the problem please?
4
15887
by: Mufasa | last post by:
Is there any way to force a thread to abort and really have it abort? I have a thread that every once in a while gets hung to so I kill it. Problem is I have a thread that every once in a while gets stuck (I'm working on why that happens) and I want to kill it. I do a thread.abort and the status becomes abortrequested but never actually goes through. If it were an actual process I could kill it but there seems to be no real kill for...
1
1490
by: NvrBst | last post by:
Is there any internal thread variables/states I can set to request stops? or I need to make my own global variables? IE ----------------------------- Thread myThrd = new Thread(new ParameterizedThreadStart(Func)); myThrd.Start(objParams); *do stuff* myThrd.ThreadState = ThreadState.SuspendRequested; *do more stuff*
65
3616
by: Aditya | last post by:
Hi I am using a line of as char recvedValues = {'\0'}; in my code. I get a warning as near initialization for recvedValues. I am using gcc 3.4 Can anybody please explain the meaning. Thanks Aditya
0
10469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2934
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.