multithreading

Performing Method on background thread with NSNotification

I am trying to perform an operation on a background thread. In the past i have used [self performSelectorInBackground: @selector (getSetDisplay) withObject: nil]; to accomplish this. However, I have registered for this function to be executed within an NSNotification and I need to animate the UIActivityIndicator. The UIActivityIndic...

In Windows Vista, what IRQL is the thread scheduler run at?

In Vista, what IRQL is the thread scheduler run at? ...

What is "inline thread"?

What does "inline thread" mean? I got this question during my latest interview. Anybody used this? ...

Java Async REST web service using Jersey?

Hi, I need to implement a Java REST Web Service (we use Jersey framework) which can basically either a. block waiting for some event (or poll for the event), before returning the response b. provide some kind of aysnc behaviour to notify the client when the request has been processed. I was thinking of returning a transationID, and ha...

setContextClassLoader slows down drastically when called concurrently

I have pin pointed a bottle neck in my application, it seems to me that it boils down to a call to Thread::setContextClassLoader. Basically I was forced to mess around with the thread's context class loader due to issues with 3rd party libraries (see this question to understand why). The solution I picked was to my knowledge the comm...

java: list thread locals?

Is there a way to list TheadLocals bound to a thread? Ideally I could access the Thread.threadLocals map, but it is package protected. The reason I need this is I need to inspect threads as they are returned to a thread pool to ensure the ThreadLocals have been properly cleaned up. Perhaps there is another way to do this? ...

Multi-threading in C not working on single-core processor?

So I just ran the example from this website and it says the the output should alternate like so: threadFunc says: processing... main() is running... threadFunc says: processing... main() is running... However on my machine it produces this: threadFunc says: processing... threadFunc says: processing... main() is running... main() i...

Segmentation Fault in Boost Threads tls_destructor

I wrote a small app using the Boost asio example(3) of the multi-threaded HTTP server. Periodically I get a seg fault which occurs if I ctrl-c the app. I know I must be overwriting memory somewhere, but not really sure how to debug it. The stack trace in GDB is not helpful. Are there some tools in GCC that can help me detect the corr...

user threads resources when mapping on kernel threads

I understood the mechanism of user threads mapping on kernel threads at thread level: now I'd like to understand the mechanism at process level. An user thread can access the resources of his "father" process: when the user thread is mapped on a kernel thread, what is of the user process resources? And more: We're talking of "kernel th...

ASP.net user data getting crosses between users accessing objects

This is kind of a weird one. I'm looking for ideas on how to ask the right question as much as I am an actual solution. I've got a website and we just had a huge jump in traffic. Now all of the sudden we're getting sql parameter errors left and right. We switched to a new sql server a few weeks ago and everything has been fine but the a...

Linux thread performance very fast under GDB but extremely slow otherwise

I'm working on an embedded C++ application running on Linux. I've recently encountered some really strange performance problems with pthreads. My system has 8 threads passing information back and forth protected using a pthread mutex lock. When running my application stand-alone, thread performance is abysmally slow when taking a mute...

iPhone ExtAudioFileConvert.cpp: getting rid of mutex and thread handling...

I'm rewriting the ExtAudioFileConvert.cpp sample from Apple to do some extra output file handling... I am not going to be calling it more than once, so I should have no re-entrancy issues. I'm also rewriting it in C. Since I haven't had a lot of experience with mutex locking or thread handling, I was hoping not to copy and paste tho...

What is the best way to delay thread starts until a specific time?

I am building an application which needs to call a certain API at specific times. I would like to set execution times for each of the calls, and have my execute function be called automatically when each call needs to execute. What's the best way to do this? I have thought about creating a new Timer for each new call that needs to be ex...

Force CherryPy Child Threads

Well, I want cherrypy to kill all child threads on auto-reload instead of "Waiting for child threads to terminate" because my program has threads of its own and I don't know how to get past this. CherryPy keeps hanging on that one line and I don't know what to do to get the 'child threads' to terminate... ` [05/Jan/2010:01:14:24] ENGI...

please tell me which one is faster desktop application or web application in .net

i am to create a application which will send an xml file through https protocol and get a xml file as a response. and this process will go for more then lac. times(continusly to download all xml files around 1-2 lac.). so please tell me i should create a desktop application for this (in .net) or asp.net . and should i use threading for t...

When to use lock vs MemoryBarrier in .NET

In .NET the lock keyword is syntactic sugar around Monitor.Enter and Monitor.Exit, so you could say that this code lock(locker) { // Do something } is the same as Monitor.Enter(locker); try { // Do Something } finally { Monitor.Exit(locker); } However the .NET framework also includes the MemoryBarrier class which works in a s...

Event thread in java

I want to create a background Thread handling some tasks (Runnable) and executing them in the order in which they are posted. Important : these tasks must NOT be executed on the Event Dispatcher Thread. Something like : BackgroundEventThread backgroundEventThread = new BackgroundEventThread(); then, later, and in many places in the...

Threads inside a foreach loop in c#

Hai guys, I had the following code to send different mails to differnt users in my asp.net web application foreach (DataRow dataRow in dataTable.Rows) { sendMails(); } public void sendMails() { //mail code } Now i want to use threads inside foreach loop, but i dont know what would be the result because if i start 'n' number of t...

Multithreading python application hangs while running its threads.

I am trying to create a MainObject which is availible as a DBus service. This MainObject should always stay responsive to other objects/processes and for this non-blocking even while processing its items. for that reason items are processed in a seperate thread one after another (queue-style). You can add items to the MainObject via DBus...

Is it possible to use Callback using ThreadPool? Can I use as many BackgroundWorkers as possible?

I know that Asycronous Delegates are used for implementing Call back functionality in .NET. I want to know Is it possible to use Callback using ThreadPool? Can I use as many BackgroundWorkers as possible? What I exactly want to know is, Is there any additional overhead involved in using BackgroundWorker instead of ThreadPool/AsyncD...