PC Review


Reply
Thread Tools Rate Thread

Async UI Calls Block on Dual-Core CPU, work fine on Single Core. Why?

 
 
costasz@gmail.com
Guest
Posts: n/a
 
      19th Sep 2006
I am using the code from this MSDN article

http://msdn2.microsoft.com/en-us/library/bz33kx67.aspx

Everything worked great on my single core CPU laptop. I then tried to
run the .exe on my Dual core Pentium-D at work. The UI becomes
unresponsive while the background thread is running. When I go into
task manager and change the CPU affinity from 0,1 to just 0, the UI
becomes responsive again. Please keep in mind that made the loop longer
so that I have time to observe the blocking. Anyone have any ideas?

Thanks

CZ

 
Reply With Quote
 
 
 
 
Sean Chambers
Guest
Posts: n/a
 
      19th Sep 2006
What does the memory consumption look like on the dual core box. You
said you made the loop longer to observe the blocking. Perhaps it's
working so quickly that it chews all your memory up?

Just throwing ideas out there.

I made a multi-threading async app on a dual core box with no problems.
The child threads would update a listbox with updates as they complete
certain tasks in text files. worked like a charm. thats why this is
kind of weird.

(E-Mail Removed) wrote:
> I am using the code from this MSDN article
>
> http://msdn2.microsoft.com/en-us/library/bz33kx67.aspx
>
> Everything worked great on my single core CPU laptop. I then tried to
> run the .exe on my Dual core Pentium-D at work. The UI becomes
> unresponsive while the background thread is running. When I go into
> task manager and change the CPU affinity from 0,1 to just 0, the UI
> becomes responsive again. Please keep in mind that made the loop longer
> so that I have time to observe the blocking. Anyone have any ideas?
>
> Thanks
>
> CZ


 
Reply With Quote
 
costasz@gmail.com
Guest
Posts: n/a
 
      20th Sep 2006
I had to put a Thread.Sleep(1) inside the Background Thread's loop.
Everything worked then.

Thanks


Sean Chambers wrote:
> What does the memory consumption look like on the dual core box. You
> said you made the loop longer to observe the blocking. Perhaps it's
> working so quickly that it chews all your memory up?
>
> Just throwing ideas out there.
>
> I made a multi-threading async app on a dual core box with no problems.
> The child threads would update a listbox with updates as they complete
> certain tasks in text files. worked like a charm. thats why this is
> kind of weird.
>
> (E-Mail Removed) wrote:
> > I am using the code from this MSDN article
> >
> > http://msdn2.microsoft.com/en-us/library/bz33kx67.aspx
> >
> > Everything worked great on my single core CPU laptop. I then tried to
> > run the .exe on my Dual core Pentium-D at work. The UI becomes
> > unresponsive while the background thread is running. When I go into
> > task manager and change the CPU affinity from 0,1 to just 0, the UI
> > becomes responsive again. Please keep in mind that made the loop longer
> > so that I have time to observe the blocking. Anyone have any ideas?
> >
> > Thanks
> >
> > CZ


 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      23rd Sep 2006
Please post a complete sample that illustrates the issue, there must be
something wrong with your code.

Willy.

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
|I had to put a Thread.Sleep(1) inside the Background Thread's loop.
| Everything worked then.
|
| Thanks
|
|
| Sean Chambers wrote:
| > What does the memory consumption look like on the dual core box. You
| > said you made the loop longer to observe the blocking. Perhaps it's
| > working so quickly that it chews all your memory up?
| >
| > Just throwing ideas out there.
| >
| > I made a multi-threading async app on a dual core box with no problems.
| > The child threads would update a listbox with updates as they complete
| > certain tasks in text files. worked like a charm. thats why this is
| > kind of weird.
| >
| > (E-Mail Removed) wrote:
| > > I am using the code from this MSDN article
| > >
| > > http://msdn2.microsoft.com/en-us/library/bz33kx67.aspx
| > >
| > > Everything worked great on my single core CPU laptop. I then tried to
| > > run the .exe on my Dual core Pentium-D at work. The UI becomes
| > > unresponsive while the background thread is running. When I go into
| > > task manager and change the CPU affinity from 0,1 to just 0, the UI
| > > becomes responsive again. Please keep in mind that made the loop
longer
| > > so that I have time to observe the blocking. Anyone have any ideas?
| > >
| > > Thanks
| > >
| > > CZ
|


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dual core only running in single core mode Paul Windows XP Configuration 4 4th Mar 2009 10:44 PM
Force Application to use single core on dual core machine BadHead Windows XP Help 1 13th Nov 2007 03:40 PM
Vista freezes solid on AMD dual core, single core ok =?Utf-8?B?SGVuZHJpayBTZWxpZ2Vy?= Windows Vista Hardware 6 24th Oct 2007 03:43 PM
Sysprep Question - Single Core and Dual Core Machines =?Utf-8?B?Sm9obiBGb3J0aA==?= Windows XP Setup 4 11th Oct 2007 05:39 PM
Dual core/single core for games? Bob DIY PC 15 7th Feb 2006 07:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:18 PM.