I am doing a multi-threaded application in C# and need to pass some parameters to a thread.
Attempting to use the ParameterizedThreadStart class so that I can pass a class variable (which contains all the parameters I want to pass). However, the class seems to be unrecognised (there is a red line underneath it in the source code) and on...
I am having a baffling issue while trying to fill an NSMutableArray with UIImages.
CGBitmapInfo bitmapInfo = kCGBitmapByteOrderMask;
CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
while(...) // <--- Iterates through data sets
{
CGDataProvide...
I have a case where I am getting lots of sockets requests coming in. I would like to update the UI 3 seconds after the last socket request has come in. E.g If socket request comes in and the previous one was only 2 seconds ago it should clear the UI Update and start waiting for 3 seconds.
Notes:
Each Socket Request comes in on a differ...
It would be a very simple question (could be duplicated), but I was unable to find it.
Win32 API provides a very handy set of atomic operations (as intrinsics) such as InterlockedIncrement which emits lock add x86 code. Also, InterlockedCompareExchange is mapped to lock cmpxchg.
But, I want to do that in Linux with gcc. Since I'm worki...
I need two seperate lists, which every item is Integer, String, Bitmap - and one which every item is Integer, String String. However I don't know how to do this, or even where to look - I've googled for custom objects and custom object lists. What I'm trying to do is this.
Custom Object1 is Integer, String, Bitmap
Custom Object2 is Integ...
Hi all,
I've read and re-read Java Concurrency in Practice, I've read several threads here on the subject, I've read the IBM article Dealing with InterruptedException and yet there's something I'm simply not grasping which I think can be breaked down in two questions:
If I'm never ever interrupting other threads myself, what can trigg...
Possible Duplicate:
Maximum number of threads in a .NET app?
Is there a limit on the number of threads we can create in a .NET application ?
I am assuming that the number of threads that can be created is limited by the amount of memory available since the threads' stack needs to be allocated. Please correct me if I am wrong. ...
I've noticed that when "giving focus" back to your main thread, when invoking from another thread, you can either invoke "this" or the control that you would like to, well invoke. I've noticed this doesn't matter when giving control back, so can anyone explain why I would invoke a control over the main thread? Does it matter, or is the...
I've just completed a significant revision of my task pool/parallelization library for the D programming language. I'm interested in having the API critiqued, especially by people who are not regular users of D, but know a decent amount about use cases for such a library. I'd like to avoid the groupthink that would be created by asking...
I wrote a code to create some threads and whenever one of the threads finish a new thread is created to replace it. As I was not able to create very large number of threads (>450) using pthreads, I used clone system call instead. (Please note that I am aware of the implication of having such a huge number of threads, but this program is ...
Hi, I'm programming simple TCP file transfer using TcpListener on reciever side and TcpClient on sender side. I have 2 options - synchronnous or asynchronnous. If I use synchronnous, I have to put sending/recieving methods into BackgroundWorker, to prevent freezing GUI thread. Asynchronnous version is without problems...
My question is,...
I am using ThreadPool to execute a set of tasks in a windows service. The service spawns new threads every 10seconds. I would like to record the name of the thread that picked up a particular task from the database. Is it possible to get the name of the thread?
...
I know in C# when you have an object you want to use as a lock for multi-threading, you should declare it as static inside of a class, which the class instance will be running in a separate thread.
Does this hold true for Java as well? Some examples online seem to declare the lock object as only final...
Edit:
I have a resource that I ...
There has been a tremendous amount of research on migrating Java threads between different JVMs on different machines, but is there some publicly available, maintained, de facto implementation that everyone uses? If there is not one good implementation, but multiple ones, which one do you guys recommend and why?
(Note: I'm not talking ...
I've got this script, that uploads some files, connects via ssh and does some stuff on the remote server, kinda like deployment script, and I want to make it run whenever I want to and to be able to reset it in the middle of processing.
def deploy
# some stuff happens here
end
def do_deploy
$deploy.kill! if $deploy
$deploy = Th...
I have a problem with multithreading in .net. With the following code:
class Program
{
private static ManualResetEvent[] resetEvents;
private void cs(object o)
{
int xx = 0;
while (true)
{
xx++;
System.Xml.XmlDocument document = new System.Xml.XmlDocument();
docume...
Our codebase has a lot of threading restrictions encoded in comments - such as:
This class is thread-safe (all public methods may be safely accessed from any thread)
Must hold a lock on "xyz" to access/invoke any public members
Must only be accessed from thread "xyz" (usually but not always referring to the GUI thread)
This lock must b...
We have a batch process consisting of about 5 calculations that happens on each row of data (20 million rows total). Our production server will have around 24 processors with decent CPUs.
Performance is critical for us. Assuming that our algorithms are pretty efficient, what would be the best way to achieve maximum time performance fo...
Hi all,
Was wondering if anyone could help me on background threading on Android.
I have a piece of code that records from the mic of the device and then plays back what it records through the ear piece(on 1.5).
I am trying to run it in a thread but have been unsuccessful in getting it to run as a background thread.
Currently it run...
Hello,
I have got a problem here in terminating the threads. The problem is that I am using applet thread to access JS DOM and manipulate innerHTML of a span to right the Thread Name as the innerHTML. It works fine until I keep refreshing the page but if I dont give it a sleep of like 200ms and go to another page which dont have an...