473,394 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

ThreadState of a background Thread

I have created some background threads so that when the application aborts
all the threads should be automatically aborted. But the problem is that when
I make a thread background thread I am unable to correctly find its thread
state as the thread state property always return 12.
If I make the thread foreground the thread state property works just fine.
Please help me in finding the solution.
Nov 22 '05 #1
1 1962
Hmm... 12 means "unstarted background thread", did you call Start on the
thread object?

Willy.

"Ahsan" <Ah***@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
I have created some background threads so that when the application aborts
all the threads should be automatically aborted. But the problem is that
when
I make a thread background thread I am unable to correctly find its thread
state as the thread state property always return 12.
If I make the thread foreground the thread state property works just fine.
Please help me in finding the solution.

Nov 22 '05 #2

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

Similar topics

1
by: Ahsan | last post by:
I have created some background threads so that when the application aborts all the threads should be automatically aborted. But the problem is that when I make a thread background thread I am...
0
by: Gomaw Beoyr | last post by:
Hello The book "C# Black Book" chapter about Threads says that a "background thread" cannot communicate directly with a visual element, e.g. a label, and thus has to use the BeginInvoke method,...
2
by: nevin | last post by:
Hi, I have a couple of threads each one is running inside a class that is basically a wrapper around the thread with some additional methods. It all seems to hang together pretty good but for some...
2
by: Michael Moreno | last post by:
Hello, I am getting a ThreadState value of 12 which I do not know what state represents The code is simple and looks like this private Thread m_Thread; .... m_Thread = new Thread(new...
1
by: Flack | last post by:
Hey guys, Here is the scenario: I have the main form open and a background thread is running. The background thread sometimes needs access to the main forms graphics object and gets it by...
1
by: JEB | last post by:
I know that with Web Services, you should be doing everything in a stateless environment. However, I have three methods out of over 100 that need state. I have the client cookie container,...
33
by: bonk | last post by:
I have an application that needs to perform some background work, i.e. Logging, wich must not block the main thread. How would I basically design such a scenario? It is obvious that I should do...
7
by: John J. Hughes II | last post by:
I have a DataGridView with a TextBoxColumn. I setting the data source to a List<stringvalue in a static class. The list is filled from a background thread. So far all is fine and it works...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
4
by: Claire | last post by:
Hi, I'm writing an internal mail system module for my project. There may be several thousand 'users' on site, and I need the whole list for filtering, so I decided to load up the users in the main...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...

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.