multithreading

Threaded SOAP requests in Python (Django) application?

I'm working with an application that needs to be make some time consuming SOAP requests (using suds, as it were). There are several instances where a user will change the state of an object and in doing so trigger one or more SOAP requests that fetch some data. This could be done in the background, and right now the user has to wait whi...

FP-intensive hyperthreading performance on latest Xeons

We have recently purchased a dual Intel X5650 workstation to run a floating-point intensive simulation, under Ubuntu 10.04. Each X5650 has 6 cores, so there are 12 cores in total. The code is trivially parallel, so I have been running it mostly with 12 threads, and observing approximately "1200%" processor utilization through "top". Hy...

Displaying UIActivityIndicator while performing a SYNCHRONOUS download

I am downloading XML to populate an array used to build UITableView. Until I'm informed otherwise, I believe I have to completely download the array before I can display it in the table (also it's text only and extremely small, so it downloads in a reasonable time on the slowest possible connection). It does take about 3-5 seconds at it'...

wait()/wait(timeout)/sleep(timeout) ?

Hi, What is the difference between wait() and wait(timeout).Anyway wait() needs to wait for a notify call but why we have wait(timeout) ? So what is the difference between sleep(timeout) and wait(timeout) ? ...

List<T> multiple writer thread safety

If I have multiple threads calling the Add method of a List object, and no readers, do I only need to lock on the List object before calling Add to be thread safe? ...

Message queue, c++ multi thread

Hi, I looking for cross platform multithread message queue implementation on c++ (not slot/signal) . Better if it based on subject-observer pattern. ...

Warning: UIKit should not be called from a secondary thread.

In my iPhone app I need to connect to a web server as this can take some time I'm using threads like this: [NSThread detachNewThreadSelector:@selector(sendStuff) toTarget:self withObject:nil]; - (void)sendStuff { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; //Need to get the string from the textField to send to ...

how about android interval

hi expert, i did wifi scanning for android, but now i want this wifi scanning run at set interval period, how this can be done, can any provide any snippets, thanks in advance ...

VB.Net Asynchronous background worker inside a loop.

Im using Vb.net visual studio 2008. i have got a process(system.diagnostics.process) to be run in background and it updates the Ui thread progressbar and a label and i have worked it using backgroundworker.runworkerAsync. Now the problem is i have to work the same process for a number of time with different inputs. The code block is : ...

Does an ASP.net page running on IIS make use of multicore processors?

I've got an ASP.net page that runs a script which takes anywhere between 1 second and 10 minutes to run dependant on the parameters passed in to it. My question is, if the server is multicore, will this script automatically make use of all the processors, or is it constricted to one. Thanks for any help ...

How do you hang a thread in Java in one line?

By one line I mean at most 100 chars per line. (I basically need this to keep the program alive. The main thread registers callback listeners that are run in separate threads. I just need the main one to hang forever and let the other threads do their work) ...

JNotify : Supervise a directory all the time

Hello, In my project, I use some files in a directory. And for some reasons, I must load the files at the launch of the project, and if there is an action on these files, I must reload them (in a HashMap) For the moment, I load them just at the moment of the use, but I want to do this at the load of application, and let the JNotify work...

PyGTK Window not hiding when told to

In my PyGTK application, I am asking a user to find a file so that operations can be performed on it. The application asks the user for the file, and relays that filename to the necessary methods. Unfortunately, when calling the gtk.dispose() method on that dialog, it just hangs there until the method being called upon to perform the f...

WeakReference in Java inside Thread

Hi, i am trying to create an background thread that updates a Runnable at a given interval. It should also not prevent the "parent" from beeing garbage collected. My problem is as follows. My WeakReference seems to act as a "strong" Reference, It doesn't stop my thread form accessing the runnable that i am supposed to have made availab...

Is ucLibc malloc thread safe?

Is ucLibc malloc thread safe? ...

Passing char[N] as thread argument in c?

Heres my code: void *PrintLine(void *line) { printf("Line: #%s\n", (char *)line); pthread_exit(NULL); } int main (int argc, char *argv[]) { char line[80]; while(fgets(line,sizeof(line),fp)) { pthread_create(&threads[rt], NULL, PrintLine, (void*)line); } fclose(fp); } Please dont tell me that runnin...

Passing exceptions across threads in an MVC application

I need to call a few webservices while constructing an MVC page, so I'm threading the work via the threadpool, and using ManualResetEvents to to determine when I have my results. If one of the threads throws an exception though, it'll crash the app. I have exception handling set up via a Filter, but I need to get the exception back t...

Entity framework: How can I use more then one context?

Hi, I'm new with EntityFramework. My application has a pool of context object instances (Each context has 1 connection to the DB). The problem is that when I update an object (and calling SaveChanges), the data is updated in the DB and in the updating context but when I select from other instance, it gets the old data of the selected ...

How sync all threads in the Android framework

I want to sync threads in the Android framework. How can I do this? ...

How to update silverlight UI while processing

Hi, I went through several examples posted online but I cant answer my question. I have my 'p' variable that is being increased by 1 in the for loop. I want the UI to display the progress of calculation (to show how 'p' is increasing from 0 to 1000000). I do the calculation on the separate thread and the I call dispatcher to update the...