Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Infinite loop in Asyn Call

Infinite loop in Asyn Call

Scheduled Pinned Locked Moved C#
help
7 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    subrata jana
    wrote on last edited by
    #1

    In Asyn Callback if some error happens and it enters into a infinite loop then all other calls will be hanged or these request will get result.

    L R 2 Replies Last reply
    0
    • S subrata jana

      In Asyn Callback if some error happens and it enters into a infinite loop then all other calls will be hanged or these request will get result.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Question?

      S 1 Reply Last reply
      0
      • S subrata jana

        In Asyn Callback if some error happens and it enters into a infinite loop then all other calls will be hanged or these request will get result.

        R Offline
        R Offline
        Rob Graham
        wrote on last edited by
        #3

        I think you are asking: "In Asyn Callback if some error happens and it enters into a infinite loop then will all other calls will be hanged or will these requests be processed?". I beleve the answer is that they will hang.

        S 1 Reply Last reply
        0
        • L Lost User

          Question?

          S Offline
          S Offline
          subrata jana
          wrote on last edited by
          #4

          hi i m writing code for a Client/Server mechanism, here many users can connected and get some data. Now in some connection there might be some errors and that particular asyn call may enter in a infinite loop. So in this case the other users connected are able to make request and get data or server will stop responding to them also. Thanks in advance.

          L 1 Reply Last reply
          0
          • R Rob Graham

            I think you are asking: "In Asyn Callback if some error happens and it enters into a infinite loop then will all other calls will be hanged or will these requests be processed?". I beleve the answer is that they will hang.

            S Offline
            S Offline
            subrata jana
            wrote on last edited by
            #5

            Hi As per ur believe it will hang and it is really so. So now how can i achieve this. Say in ATM a user comes and checks his balance now if there is some error in server them it is particular for that request all other users are not affected. My requirement is same the if a asyn call enters into infinite loop it should be for that call only not for all the subsequent request. thanks in advance

            L 1 Reply Last reply
            0
            • S subrata jana

              hi i m writing code for a Client/Server mechanism, here many users can connected and get some data. Now in some connection there might be some errors and that particular asyn call may enter in a infinite loop. So in this case the other users connected are able to make request and get data or server will stop responding to them also. Thanks in advance.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              If you don't create a seperate thread for all your incoming connections then an infinite loop will hang your entire program. But even if there's some errors in the data your application should never, under any circumstances, fall into an infinite loop. Also not, when it uses multiple threads. Try to handle this error so your app won't create and infinite loop, check the incoming data for errors etc. regards

              1 Reply Last reply
              0
              • S subrata jana

                Hi As per ur believe it will hang and it is really so. So now how can i achieve this. Say in ATM a user comes and checks his balance now if there is some error in server them it is particular for that request all other users are not affected. My requirement is same the if a asyn call enters into infinite loop it should be for that call only not for all the subsequent request. thanks in advance

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Create a Thread for each incoming connection, you may want to use a ThreadPool for this. But see my answer above, don't let your app fall into a infinite loop at all! regards

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups