Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 289891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:56:53+00:00 2026-05-12T05:56:53+00:00

Sorry, I am very new to all this multithreading stuff… I’m working on a

  • 0

Sorry, I am very new to all this multithreading stuff…

I’m working on a client/server app and I’m going to use System.Net.Sockets.NetworkStream‘s Async IO methods.

I’m aware that after calling BeginRead, the system will start calling my callback every time it receives data. The callback could take a significant amount of time to complete but it needs to complete before any other threads run this same callback.

If I simply mark my callback method as synchronized, should that be enough to ensure that each callback thread will run to completion in the order that the system received their data?

If not, what synchronization tool would be best? (e.g. Monitors, WaitHandles, Semaphores?, etc…)

Edit: this is in VB 2008 on Win Server 2008

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T05:56:53+00:00Added an answer on May 12, 2026 at 5:56 am

    Each BeginRead matched a single EndRead. If you want to read more, you have to call BeginRead again in the callback.


    BTW, sockets are pretty low level. Are you sure you can’t use WCF for this?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background / Disclaimer First of all, please feel free to skip this entirely if
I'm working on a ASP.NET website that on some requests will run a very
I apologize for this, and I am sure it's a very rookie question... but
Let me start by saying, I am new to Java programming. I have coded
I am trying to create a moderately complex web page. This is not something
So this is driving me crazy. Basically, when I hard-code my user name and
Possible Duplicate: Using var outside of a method I've searched for this a bit,
For some reason when I call a namespace within this class, I get an
(Sorry if the topic isn't titled properly, would appreciate if somebody helps me to
Sorry, a beginner's questions: I have created an instance of an UILabel and would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.