TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Don Kooker
NA
3
0
async reading using beginread
Apr 6 2008 1:16 AM
A few questions as to how beginread on a tcpclient or socket. If I start beginread, I believe the thread comes from the thread pool. Does the thread start when beginread is called, when data starts arriving, or when the specified number of bytes are recd and the ascyn callback method is started? The reason I ask, is I am wondering if I have a large number of connections reading and the clients that are sending data are slow (or not at all), will the thread pool quicklty fill up with threads that aren't doing anything waiting on data to be recd from clients?
The other related question I have is related to how to cleanly shutdown if there are async reads going on. Can you just close the tcpclient down from the main thread and the async readers go away gracefully, or do you have to do some sort of explicit locking on something like the tcpclient itself?
Reply
Answers (
2
)
Sharing a Generic Collection
Design help needed: Requirement to process huge number of data efficientlty