worker-thread

Do COM component invoked asynchronously from asp.net run on IO thread or worker thread??

I need to call a third party COM component from an asp.net site. The site is designed to run to pages asynchronously (marking the page and webpart as async). The page registers and invokes async calls by the standard page.RegisterAsyncTask() method. Async methods/components invoked on the managed components would be run on IO threads ...

How to prevent memory leaks while cancelling an operation in a worker thread C++?

Currently i am working on a desktop application which consists mathematical analysiss.I am using qt for GUI and project written in c++. When user starts an analysis, i open a worker thread and start a progress bar.Everything is ok up to now, problem starts when user cancels operation.Operation is complex, i am using several functions and...

How can I tell if a thread is finished executing without polling ThreadState?

Is there an elegant way to know when a worker thread is done executing so I can access resources it produced? For example if the worker thread queried a list of SQL Servers using ServersSqlDataSourceEnumerator.Instance.GetDataSources(); and saved the result in a DataTable variable, what mechanism can I use to know when this DataTable...

C#, Event Handlers and Threading

I'm writing a little chat app, and I have this event handler: void o_Typing(object sender, EventArgs e) { MessageBox.Show("Fired!"); this.Text = "Fired!"; } o_Typing is a method in a class derived from TabPage. Basically, I want each conversation to have it's own tab. The event handlers are fired by my Chat object, which is r...

Empty Worker Threads, What are they?

While debugging a .NET Framework 3.5, WinForms application I spotted some "Worker Thread"s without a name. I know when you open an application you've got a one worker thread by default. However in the middle of debugging when I pause the debugger and take a look at the "Threads" window I see about 5+ similar threads (priority=normal)....

Proper way to have an endless worker thread?

I have an object that requires a lot of initialization (1-2 seconds on a beefy machine). Though once it is initialized it only takes about 20 miliseconds to do a typical "job" In order to prevent it from being re-initialized every time an app wants to use it (which could be 50 times a second or not at all for minutes in typical usage), ...

ASP.NET Asynchronous Tasks - Worker Thread Not Releasing?

I am having an issue with testing asynchronous tasks in ASP.NET & IIS7. From what I have read, the worker thread should be released back into the thread pool while the I/O thread performs the async work, allowing ASP.NET to server other incoming requests. But when I simulate heavy load on the web application by making 20 simultaneous req...

Boost Thread Specific Storage Question (boost/thread/tss.hpp)

The boost threading library has an abstraction for thread specific (local) storage. I have skimmed over the source code and it seems that the TSS functionality can be used in an application with any existing thread regardless of weather it was created from boost::thread --i.e., this implies that certain callbacks are registered with the ...

OCCI createEnvironment Blocks My Thread

Hello, I'm writing a multi-threaded application, where there is a main thread which distributes tasks to the worker threads. According to the task, a worker thread creates a connection, by using a global occi environment. When a worker thread completes its task, it closes the connection (I'm sure, there is no exception thrown while ter...

WPF worker thread requires suspension by consumer notification

Hi I have a producer - consumer pattern. The WPF UI is sort of ancilliary to a long-running worker thread which is listening to packets and enqueing tasks. In practise all the messages are dequeued and then the UI consumer processes. The issue I have is that I have a UIcontroller class which is responsible for all WPF GUI components. It...

Is it not possible to show a FolderBrowserDialog from a non-UI thread?

I'm facing problem in showing FolderBrowserDialog instance created and called from a non-UI thread. It doesn't get renders properly. Being more specific, it doesn't shows the folder tree but displays only the Make New Folder OK and Cancel ...

How to design non-EJB load balanced applications?

I have a java class Processor that is listening to a jms topic and it is struggling to keep up with the speed in which messages are arriving so we've decided to go concurrent: A single class listening to the topic who's job is to hand the messages out to a pool of worker threads, effectively being a load balancer. It also has to preven...

Maximizing Worker Thread Utilization

To solve a problem (and better my understanding of multitasking) I have written a small thread pool implementation. This thread pool spins up a number of worker threads which pop tasks off of a queue as they are added by the client of the thread pool. For the purposes of this question when the task queue is empty the worker threads are a...

403 Forbidden with php in worker mode. Only to php files from browser

Hello First off let me start by saying that yes I have searched for this in google and in stackoverflow specifically, I have found many answers and tried them all. At this point I believe my only resource is posting the question myself, even if the scenario sounds repeated please be so kind as to try to help. The situation is quite b...