List Info

Thread: Maximum Number of Threads to Use




Maximum Number of Threads to Use
user name
2006-08-04 14:15:16
> Basically the tasks tend to be querying a SQL server,
> generating XML and
> saving that back in to the SQL Server.  Also sending
emails.
>
> Any suggestions as to where I could read about async IO
and
> completion ports
> ?  This is all .Net 2.0 btw.

If you're on 2.0 doing SQL work, you should definitely read
up on the async
support that was introduced (SqlCommand.BeginExecuteXxx). 
Related to that
is the SynchronizationContext/AsyncOperation stuff that was
introduced as
well.  For a quick intro to the async SQL stuff, you can
start with one of
my blog posts[1] (from Nov of 2005).  You'll also find some
other stuff in
the Oct & Nov 2005 area of my blog.  If nothing else,
you'll see a bit of
sample code and discover the names of some types/methods you
can read up on
in MSDN and/or google around for.

On the async i/o and sockets front, I've got a sample over
here[2] that
demonstrates async I/O and incoming connection accept on the
1.1 runtime.
That particular app doesn't do anything other than let me
see how many idle
connections I can handle on a given machine (as well as how
to deal with
multithreaded access to Windows Forms controls in a safe
fashion).  But
there's some sample code value there...

-Mike
Bear Canyon Consulting LLC
http://www.bearcanyon.com
http://www.pluralsigh
t.com/mike

[1] http://pluralsight.com/blogs/mike/archive/2005/11
/29/17198.aspx
[2] htt
p://www.bearcanyon.com/dotnet/#ConnectionLimit

===================================
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 )