I have recently started programming in WPF and bumped into the following problem. I don't understand how to use the Dispatcher.Invoke method. I have experience in threading and I have made a few simpele Windows Forms programs where I just used the
Control.CheckForIllegalCrossThreadCalls = false;
Yes I know that is pretty lame but thes...
Can anyone recommend any resources on the .NET threading API? I've used a few of the basic features, but I'd like to get more familiar with the more obscure parts.
...
What solutions do I have if I want to prevent the UI from freezing while I deserialize a large number of UI elements in WPF? I'm getting errors complainig that the objects belong on the UI Thread when I'm trying to load them in another thread. So, what options do I have to prevent the Vista "Program not responding" error while I'm loadin...
Almost anywhere I read about programming with CUDA there is a mention of the importance that all of the threads in a wrap do the same thing.
In my code I have a situation where I can't avoid a certain condition. It looks like this:
// some math code, calculating d1, d2
if (d1 < 0.5)
{
buffer[x1] += 1; // buffer is in the global mem...
I am writing a program using .Net 3.5 and OpenCV 1.1. I have multiple threads that need to get an image variables from the web camera on my computer, the problem being I get memory violation errors when multiple threads try to access the camera at the same time. I know I can use PostThreadMessage and GetMessage to send a variable to the ...
Hi,
can anybody tell me what happens if multithread program receives SIGSTOP signal during execution of mq_send?
...
I want to setup a serialized task queue using NSOperationQueue but I'm a little confused by the terminology discussed in the documentation.
In the context of an NSOperation
object, the terms concurrent and
non-concurrent do not necessarily
refer to the side-by-side execution of
threads. Instead, a non-concurrent
operation i...
I know this is a bad idea! Certainly for safe programming the stack for a given thread should be considered private to that thread. But POSIX at least guarantees that all of a thread's memory is shared and writeable by other threads, which means the stack of one thread can (in theory) be written to by another thread. So I'm curious how o...
I've always been in the habit of naming my threads like this because I read sometime to do so, but it occurred to me that I've never used any debugging tool that showed a thread's name.
When would naming a thread be useful? When would I actually see the name of a thread? Should I name threads for some profiling tools? What tools?
...
My program's really consuming CPU time far more than I'd like (2 displays shoots it up to 80-90%). I'm using Qtimers, and some of them are as short as 2ms. At any given time, I can have 12+ timers going per display -- 2ms, 2ms, 2ms, 250ms, the rest ranging between 200ms and 500ms. Would it be better if I used threads for some or all of t...
Many methods like stop(), resume(), suspend() etc are deprecated.
So is it useful to create threads using ThreadGroup?
...
Hi Everyone, can i have code of serverprogram which accepts several client connections using THREADPOOL concept,where each client send a file to server and server should respond to them with respective response file......i am asking like this because i am able to get several client request but i am not able to reply them back with the re...
Hi,
Say I have a dual-core windows laptop and I run a multithreaded application on it. Does the JVM run only on one core or do the JVM and the OS somehow communicate to split threads between the two cores?
A similar question has been asked for C#. I've also had a look into a couple of Sun's performance white papers. I read that threads...
I am writing front end app that connects to a DB and downloads any package it needs for a specified project. The user should be able to close the app which will not start any more DLs and wait for the current to finish and an option to forcefully close which will disconnect the current download and quit.
The files i am downloading may b...
For some reason calling an NSPathControl object in a thread is causing crashes.
- (IBAction) action5:(id)sender {
[outlet_NSPathControl1 setURL: [NSURL fileURLWithPath: @"/Users/admin/"]]; // Works fine here
[self performSelectorInBackground:@selector(background1) withObject:self]; // Jump to the thread
}
-(void) background1 {
NSAut...
It is Hallowe'en after all.
Here's the problem: I'm maintaining some old-ish J2EE code, using Quartz, in which I'm running out of threads. jconsole tells me that there are just short of 60K threads when it goes pear-shaped, of which about 100 (!!) are actually running. Intuition and some googling (see also here) suggest that what's ha...
It seems that Python standard library lacks various useful concurrency-related concepts such as atomic counter, executor and others that can be found in e.g. java.util.concurrent. Are there any external libraries that would provide easier building blocks for concurrent Python applications?
...
In a WPF application I had a BackgroundWorker thread creating an object. Let's call the object foo.
Background worker code:
SomeClass foo = new SomeClass();
// Do some operation on foo
// Set some dependency property on the main class to foo
this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
(SendOrPostCallback)delegate { SetV...
I have a Java program for doing a set of scientific calculations across multiple processors by breaking it into pieces and running each piece in a different thread. The problem is trivially partitionable so there's no contention or communication between the threads. The only common data they access are some shared static caches that don...
I don't want multiple windows, each with its own UI thread, nor events raised on a single UI thread, not background workers and notifications, none of that Invoke, BeginInvoke stuff either.
I'm interested in a platform that allows multiple threads to update the same window in a safe manner. Something like first thread creates three bu...