My background is in web programming, mostly scripting with Perl. And I've recently been tasked with creating a desktop application. I'm wondering, where can one learn such concepts like making executables, what DLLs are for, how UIs are made, what threads are, etc.
I already have C# in Depth by Jon Skeet and C# in a Nutshell. I'm not wo...
Please have a look at the following code:
var splashForm = new SplashForm();
m_Thread = new Thread( () => System.Windows.Forms.Application.Run( splashForm ) )
m_Thread.Start();
// Do some initialization
// ...
// the following method just invokes `Close()` on the right thread
splashForm.Shutdown();
// Loop until the thread is no long...
Assuming I have a C program with 3 POSIX threads, sharing a global variable, mutex, and condition variable, two of which are executing the following psuedocode:
...process data...
pthread_mutex_lock( &mutex );
variable = data_ptr;
pthread_cond_signal( &cond );
pthread_mutex_unlock( &mutex );
And the third running:
while(1) {
whil...
Does anybody knows fate of Global Interpreter Lock in Python 3.1 against C++ multithreading integration
...
I'm writing a Java program which uses a lot of CPU because of the nature of what it does. However, lots of it can run in parallel. When I run it, it only seems to use one CPU until it needs more then it uses another CPU - is there anything I can do in Java to force different threads to run on different cores/CPUs?
...
I'm writing a basic GUI application that essentially invokes other processes given some parameters, while the output of those applications is displayed to the user via a richtext box in real-time. So basically I have a seperate process thread running the child processes.
Most of the processes work fine on that thread, except for xdiscbl...
I have a Intel Quad Core CPU.
If I was to develop a Winforms application which only be used on my machine (I use C# btw), how many threads can I spawn?
Is there some sort of correlation between cores and the max number of threads I can have running at any one time? Would I need to find out how many threads are running at any one time a...
I have the following method which is spawned by a call for a new thread (using NSThread):
- (void) updateFMLs {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSArray *temp = [[NSArray alloc] initWithArray:someArrayFromAnotherProcess];
[self performSelectorOnMainThread:@selector(doneLoading:) withObject:temp...
I have a Cocoa interface. When I press a button I want to process some data, but I want to keep using the interface while it's working. I guess the only solution is NSThread. Now will there be a locking mechanism preventing me from returning from an IBAction method if it spawns a thread?
...
I recently read this great article which succinctly explains the power of Google's MapReduce:
http://www.joelonsoftware.com/items/2006/08/01.html
In Mastering Delphi 2009, Marco Cantu shows a multi-threaded for loop using Anonymous functions, which is basically the Map part of MapReduce, but said it wasn't complete and there were other...
What is the recommended way to terminate unexpectedly long running threads in python ? I can't use SIGALRM, since
Some care must be taken if both
signals and threads are used in the
same program. The fundamental thing to
remember in using signals and threads
simultaneously is: always perform
signal() operations in the main ...
I have a semaphore which restricts users to download n number of files at a time. Each file is downloaded in a separate thread.
EDIT: Modified the example so that the release happens correctly
import java.util.concurrent.Semaphore;
public void downloadFile() {
Thread downloadThread = new Thread() {
boolean bSemaphoreAcquire...
I am using the MVVM pattern to develop a WPF application.
The app loads a captcha image from the server, and assigns it
to an Image on the WPF form when ready. I am using a
BackgroundWorker to do the threading for me, as follows:
When the Window is being loaded, the following is called:
BackgroundWorker _bgWorker = new BackgroundWork...
Should there be any preconditions to be fulfilled by a team if the team were to be assigned a task that would involve a good deal of multi-threaded coding? What would you look for?
...
I have a dialog based application in which I will delegating the I/O operation read write to different thread.
I just want to clear is there any difference between two approaches..
First approach: ( I am doing this in ,my main form -Form.cs)
delegate void Action();
Action _action = new Action(Method);
this.BeginInvoke(_action);
Seco...
I have a python application that grabs a collection of data and for each piece of data in that collection it performs a task. The task takes some time to complete as there is a delay involved. Because of this delay, I don't want each piece of data to perform the task subsequently, I want them to all happen in parallel. Should I be using ...
I would like to create a singleton class that is instantiated once in each thread where it is used. I would like to store the instance pointers in TLS slots. I have come up with the following solution but I am not sure whether there are any special considerations with multithreaded access to the singelton factory when thread local storag...
How can I find out who created a Thread in Java?
Imagine the following: You use ~30 third party JARs in a complex plugin environment. You start it up, run lots of code, do some calculations and finally call shutdown().
This life-cycle usually works fine, except that on every run some (non-daemonic) threads remain dangling. This would...
I'm trying to understand basic threading in python, I'm having trouble understanding how pooling works with the queue module. Heres the example server used in the howto I'm reading from: http://www.devshed.com/c/a/Python/Basic-Threading-in-Python/2/. Basically what I don't understand is how the variable pickledList ends up available to t...
I'm looking for a class where I can override a method to do the work, and return the results like an iterator. Something like this:
ParallelWorkIterator<Result> itr = new ParallelWorkIterator<Result>(trials,threads) {
public Result work() {
//do work here for a single trial...
return answer;
}
};
while (itr.hasNext()) {
...