I have a main window form (not MDI form) and when i do some process, until this process finishes, i want to show another form (a waiting form) If i do that regular way like that ProgressForm = new FrmProgress(); ProgressForm.StartPosition = FormStart
I'm wandering whether .Net HttpClient async method run in new threads or in the main one. For example, In my Console Application, I invoke an async method to download a URL content using HttpClient.GetStringAsync method. Will this method (GetStringAs
I'll open with this: I know you can only have one TcpListener listening to any given port, I'm trying to find a way to work around this limitation. I am attempting to build an application that supports another application on the same machine. The oth
I have written a java program to paralleise Linear search algorithm,where input:100000 random nos and N=no of threads,where each thread takes 100000/N no of elements and perform linear search I expected time taken for execution to decrease with incre
I come from C# coding experience; I am beginning to learn C++ and make use of boost libraries for threading. I wrote the following class - trying to execute a member function as a thread. Writing the following simple code, i would expect the while lo
Every time I make an API call to my server to get data, I already know that I have to use the following block to execute UI changing commands because my API call executes in the background thread: dispatch_async(dispatch_get_main_queue(), ^{ //do UI
When I run this test, why does sleepThread.isInterrupted() always return false? (I had to execute Thread.currentThread().interrupt() to set the interrupted flag when catch a InterruptedException). @Test public void t() { Thread sleepThread = new Thre
I'm a bit confused, my ASP.NET MVC app will be hosted on a server, so is there any point in making it multi-threaded? For example, if I want one thread to execute my translations, is this a good idea? Can someone elaborate this to me please? I'm a bi
I am using a while loop in my method public void keyTyped (KeyEvent e) The problem here is that, the program enters the loop, it asks the user for input. And if the input is within the parameters, set by "while", it just keeps on repeating that
I am trying to receive image stream from desktop in the android phone. When I put decodeStream() method in my thread, then put decodestream() into runOnuiThread() to display in the imageView, it takes more than 7 secs. But when I try to directly read
I am using ThreadPoolExecutor to manage the number of threads, I can catch the event of creating a new Thread for ThreadPool via ThreadFactory->newThread() But I do now know how to catch the event of killing Thread which stays idle for 2minutes as fo
I have a simple application in which I create 3 threads inside a class to ping 3 different websites and note the time taken to do so. I wish to enhance it by seeing which thread out of the 3 executes successfully first and terminating the other two .
Based on core.async walk through example, I created below similar code to handle some CPU intensive jobs using multiple channels with a timeout of 10 seconds. However after the main thread returns, the CPU usage remains around 700% (8 CPUs machine).
I want to recognize if a user sent a text, using readline method from BufferedReader. While the user didn't send anything, the Thread keeps sleeping. Is there a way to do this? I'm trying for a long time, but no success yet.. I guess I have to recogn
I have this bit of code: public void run() { System.out.println("ciao"); try{ throw new InterruptedException(); }catch(InterruptedException ie){ //catch will clear the interrupted status Thread.currentThread().interrupt();}//it will set back the
How can I make the following method return a character array ? public char[] startThread() { // arr declaration Runnable r = new Runnable() { @Override public void run() { arr = getArray(); // arr assignment } }; new Thread(r).start(); return arr; }
I've inherited a reasonably large visual studio WinForms project in C# and VB.Net While I'm working with it, I get messages in the Debug window like this: The thread '<No Name>' (0x1194) has exited with code 0 (0x0). The thread '<No Name>' (0x
Is there any possibility to set unique ID for a thread? In distributed system where threads are created on many different machines (e.g. by RMI)? I need it to create log messages. From my research I know that it can be done using log4j mdc/ndc, but o
I have 30 threads (AsyncTask) executed in the same time. Before execute them, I will show progressdialog. After threads finish execution, I will dismiss progressdialog. Any suggestion on How to dismiss ProgressDialog after finish all threads?If you a
I have an application behaving like autorefresh. It checks emails, new videos, jokes, etc. My client wants these single elements check in different intervals. For example emails every minute, videos every hour, etc. So there should be option for him
We're designing a system based on CherryPy that in addition to serving web requests needs to do tasks/jobs in parallel. We want it to be a single process running as a daemon and create threads for all the parallel jobs like scheduled tasks or collect
I wrote a class in charge of keeping track of error messages, which uses a static std::list to keep track of the messages. I subclass most other classes from this, to give them the ability to write to a common error log. At program close the error lo
Does anyone know what the memory and threading models are in nodejs? In particular, is ii++ atomic? Does it behave as if ii were volatile in Java 1.5, in Java 1.4, in C, or not at all?It is useful to understand how node and V8 interact. Node handles
I have main form (PrenosForm) and I am trying to run Form2 asynchronously. It works without callback delegate: this.BeginInvoke(cp, new object[] { datoteke, this.treeView1.SelectedNode.FullPath.ToString(), this, efekt }, null); //works 1. Doesn't wor
My goal is to create (or use existing) an InputStream implementation (say, MergeInputStream) that will try to read from a multiple InputStreams and return the first result. After that it will release lock and stop reading from all InputStreams until
I need to write a logging api which does the actual logging on a seperate thread. i.e. I have an application which wants to log some information. It calls my API and the api captures all the arguments etc and then hands that off to a seperate thread
I've got a class which starts a new thread by calling public void omnom(){ t = new Thread(this, "My Thread"); t.start(); } The new thread then runs inside the run() method. So I have two threads working fine but how would I add a third? I'd like
Assume that we have Spring bean UserController with singleton scope. All my further reasoning is based on my assumption that "singleton" scope is almost similar to application scope i.e. we have only one instance for all users. If this is wrong
a bit of a juvenile question... I realise that in a Winforms app, long running code should be executed in its own thread. How does one accomplish this on say, a button click event? I want to do this in an effort to free up the UI thread so that I can
I have a Form being launched from another form on a different thread. Most of the time it works perfectly, but I get the below error from time to time. Can anyone help? at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format) at