Mouse move and thread
Posted
by
bsebi
on Stack Overflow
See other posts from Stack Overflow
or by bsebi
Published on 2011-01-01T03:01:49Z
Indexed on
2011/01/01
5:54 UTC
Read the original article
Hit count: 266
When I move the mouse over the window, the program runs much faster (cc. 3 times). This is a real time webcam .Net/Mono application running on a MacBook. On Windows works perfect. Is this maybe a power saving function of the laptop? The code:
Thread t = new Thread(Foo);
t.Priority = ThreadPriority.Highest; // I've tried without priority too, doesn't matter
t.Start();
...
void Foo()
{
while (true)
{
++k;
// then write k to the window somehow
}
}
© Stack Overflow or respective owner