All Questions

1062
votes
43answers
498458 views

How do I update the GUI from another thread in C#?

What is the simplest way to update a Label from another thread? I have a Form on thread1, and from that I'm starting another thread (thread2). While thread2 is processing some files I would like to u...
927
votes
6answers
236616 views

How do servlets work? Instantiation, sessions, shared variables and multithreading

Suppose, I have a webserver which holds numerous servlets. For information passing among those servlets I am setting session and instance variables. Now, if 2 or more users send request to this serve...
431
votes
19answers
334272 views

Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on

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 me...
520
votes
19answers
455411 views

Is there any way to kill a Thread in Python?

Is it possible to terminate a running thread without setting/checking any flags/semaphores/etc.?
1645
votes
39answers
557000 views

"implements Runnable" vs. "extends Thread"

From what time I've spent with threads in Java, I've found these two ways to write threads: With implements Runnable: public class MyRunnable implements Runnable { public void run() { //...
55
votes
1answers
4180 views

Loop doesn't see changed value without a print statement

In my code I have a loop that waits for some state to be changed from a different thread. The other thread works, but my loop never sees the changed value. It waits forever. However, when I put a Syst...
191
votes
5answers
195130 views

Start thread with member function

I am trying to construct a std::thread with a member function that takes no arguments and returns void. I can't figure out any syntax that works - the compiler complains no matter what. What is the co...
638
votes
17answers
374278 views

What is a race condition?

When writing multi-threaded applications, one of the most common problems experienced are race conditions. My questions to the community are: What is a race condition? How do you detect them? How ...
69
votes
4answers
63665 views

WebBrowser Control in a new thread

I have a list Uri's that I want "clicked" To achieve this I"m trying to create a new web-browser control per Uri. I create a new thread per Uri. The problem I'm having is the thread end before the doc...
25
votes
2answers
59609 views

StreamCorruptedException: invalid type code: AC

My problem is when it tries to read the object the second time, it throws the exception: java.io.StreamCorruptedException: invalid type code: AC at java.io.ObjectInputStream.readObject0(ObjectIn...

Previous Next