|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Async UI Calls Block on Dual-Core CPU, work fine on Single Core. Why?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 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. cost***@gmail.com wrote: Show quote > 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 I had to put a Thread.Sleep(1) inside the Background Thread's loop.
Everything worked then. Thanks Sean Chambers wrote: Show quote > 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. > > cost***@gmail.com 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 Please post a complete sample that illustrates the issue, there must be
something wrong with your code. Willy. <cost***@gmail.com> wrote in message Show quote news:1158785306.777269.195780@m7g2000cwm.googlegroups.com... |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. | > | > cost***@gmail.com 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 | |
|||||||||||||||||||||||