List Info

Thread:




<No subject given>
user name
2006-04-01 14:00:49
> Is there a way I can limit my program to only use up to
a maximum level
> of the CPU - say 60% - Its just one client is
complaining that an
> application (VB.NET) is taking up 100% of CPU when
loading.

You can also do the heavy lifting on another thread and set
that thread's
priority to BelowNormal. That lets most other applications,
including main
UI threads, take precedence so the heavy thread doesn't hog
the CPU.

This is better than restricting it to something like 60% of
the CPU because
when nothing else wants the CPU the thread can have it all.

Here are a couple of examples:

    http://www.vb-helper.com/howto_net_graph_with_thread.ht
ml
    http://www.vb-helper.com/howto_net_thread_priority.html

HTH,

Rod

Rod Stephens, Author of "Visual Basic 2005
Programmer's Reference"
http://www.v
b-helper.com/vb_prog_ref.htm

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )