|
Hello, I am writing a filewatcher windows application which will look for changes in a specified folder and then logs the details in a txt file.
I followed exactly what is mentioned in this article below http://www.codeproject.com/KB/dotnet/folderwatcher...
Started by Princeton2009 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
UI has a ....
It has to "Invoke" them to let the thread do all control work from a non-UI thread.
This 2nd thread cannot access controls in your form.
The event handler is raised with another thread.
In reaction to the event.
|
|
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....
|
Ask your Facebook Friends
|
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.
|
|
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 a function that is being called from different threads in the application. I need to know whether the thread that executes the code is the main thread(ui thread) or a working thread.
Any suggestion?
Thanks.
Started by Javier De Pedro on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
But, is there a way to know the HANDLE or ID of the main thread from this code? I mean something like thread and....
Can't there be multiple UI threads?
Sure there can, but only one main ui thread.
Of the main 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.
|
|
Suppose I have a routine like this:
private void button1_Click(object sender, EventArgs e) { Thread t = new Thread(new ThreadStart(Some_Work)); t.Start(); }
I need to put a condition so that, "If there is not already a thread running apart from the Main...
Started by JMSA on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For instance, the finalizer thread is always hanging around, and I think WinForms creates one or two with their interaction with the user interface? Or direct programming against the thread pool, using a reference to the existing thread....
|