|
I'm writing a GUI application that regularly retrieves data through a web connection. Since this retrieval takes a while, this causes the UI to be unresponsive during the retrieval process (it cannot be split into smaller parts). This is why I'd like ...
Started by balpha on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
If you do need to update the ....
Only one main thread can do any GUI updates.
Jeff has some good points.
However, the Python code executed within the context of a QT thread still system (determined at compile time).
The GIL) concurrently.
|
|
Sometimes I find myself stepping through an application in Debug mode, until I hit 'step' on some particular line and it takes way too much time doing something, eating up 100% CPU. At this point, I hit the 'Break' button and try to find what's running...
Started by Cristi Diaconescu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Sure, I could take a look at the current thread ID every now and then (like before stepping every, that would print the current thread ID (as trace points do by default, IIRC)? In this case, I'd just have doStuff(string arg){ Log("Stuf done....
|
|
I have a scenario. (Windows Forms, C#, .NET)
There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the Usercontrol_Load method the UI become nonresponsive for the duration for...
Started by SilverHorse on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
Of....
To get around this, you need to invoke the control, which method back to the main thread.
That means you shouldn't access a control from a thread other than the one where it lives.
Controls in .NET are not generally thread safe.
|
Ask your Facebook Friends
|
A requirement for my application is if it looses database connectivity then it must pop up a big modal "No Connection. Try again later" dialog blocking all user interaction until such time that connectivity is regained.
I achieve this by at the start ...
Started by George Mauer on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If your background thread has a delegate that calls into an object that is owned by the UI thread,....
If you have access to a UI element, you can push to the UI thread by using things like good material on it (Google is your friend).
|
|
I create a thread by
Thread newThread= new Thread(DoSomeWork); . . . private void DoSomeWork() { }
Is this any different from a Worker thread? If its is..which is better and when should I use a worker thread? My application needs to have lots of thread...
Started by Tj on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This is not cast in stone....
Generally the term worker (or background) thread is used to describe another thread from the one that isn't doing the work on the current thread - which in lots of cases is a foreground or UI thread.
|
|
I Was reading random questions and answers here on SO and came across this question:
C#, IAsyncResult and the thread pool
The question is asked is X method using the thread pool or using normal threads.
What's the difference between using the thread pool...
Started by Maslow on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
This way creating and disposing eliminate the cost of creating new threads, which is what happens when you create a normal thread tasks, it's better to use a manually....
A threadpool creates threads and assigsn work to a free thread.
|
|
I have two threads in an Android application, one is the view thread, and the other a worker thread. What i want to do is to sleep the worker thread until the view thread terminates the handling of the onDraw method.
How i can do this? is there a wait...
Started by Lucas S. on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Whenever the worker thread reaches a point where it should sleep, it does this:
stick.wait();
When the....
Share a java.lang.Object between the two threads, whose sole purpose is to tell the worker thread when it can continue its work.
|
|
I saw different binaries for php, like non thread or thread safe ? What does it mean this ? What is the difference between this packages ?
Started by O. on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can read about Thread Safety on http://en.wikipedia.org/wiki/Thread%5Fsafety
Regarding PHP
Is PHP thread-safe
Don't Believe The Lies: PHP Isn't Thread-Safe Yet
Difference between PHP thread safe and non thread....
|
|
Hi, I have designed an application which is running 20 instance of a thread.
for(int i = 0;i<20;i++) { threadObj[i].start(); }
How can I wait in the main thread until those 20 threads finish?
Started by Atul on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It also returns....
This function will return true if the thread has finished.
When it returns from run() ).
The thread until either of these conditions is met:
The thread associated with this QThread object has finished execution (i.e.
|
|
I have 2 nested threads.
First thread starts multiple instances of second thread. Each second thread has to sleep for some time (5 seconds).
I want to start the first thread and return a message to user immediately, but it seems my first thread waits ...
Started by Jani on
, 8 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Calling static methods on thread instances the current thread, even....
This is nothing magical about the run method.
Calling run on the thread instead of start .
There are some common mistakes when dealing with java.lang.Thread.
|