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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Threading Issues

Threading Issues

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiodesigndebugginghelp
4 Posts 2 Posters 0 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.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi I have a CAsyncSocket Class as a member of a CWinThread Class To start the TCP/IP conversation I do a PostThreadMessage to a Worker UI thread which has CAsyncSocket as a member and do a CAsyncSocket::connect However When the FrameWork calls both the CasyncSocket::OnConnect and CAsynScoket::OnSend I can tell Visual Studio Debugger -> Thread display that the thread id is that of the main thread I am having problems doing the subsequest CAsyncSocket::Send and am guessing this more than likely the issue Thanks

    F A 2 Replies Last reply
    0
    • F ForNow

      Hi I have a CAsyncSocket Class as a member of a CWinThread Class To start the TCP/IP conversation I do a PostThreadMessage to a Worker UI thread which has CAsyncSocket as a member and do a CAsyncSocket::connect However When the FrameWork calls both the CasyncSocket::OnConnect and CAsynScoket::OnSend I can tell Visual Studio Debugger -> Thread display that the thread id is that of the main thread I am having problems doing the subsequest CAsyncSocket::Send and am guessing this more than likely the issue Thanks

      F Offline
      F Offline
      ForNow
      wrote on last edited by
      #2

      The CASyncSOcket notifications OnConnect OnSend owned by main thread

      1 Reply Last reply
      0
      • F ForNow

        Hi I have a CAsyncSocket Class as a member of a CWinThread Class To start the TCP/IP conversation I do a PostThreadMessage to a Worker UI thread which has CAsyncSocket as a member and do a CAsyncSocket::connect However When the FrameWork calls both the CasyncSocket::OnConnect and CAsynScoket::OnSend I can tell Visual Studio Debugger -> Thread display that the thread id is that of the main thread I am having problems doing the subsequest CAsyncSocket::Send and am guessing this more than likely the issue Thanks

        A Offline
        A Offline
        Albert Holguin
        wrote on last edited by
        #3

        Your question is not clear...

        F 1 Reply Last reply
        0
        • A Albert Holguin

          Your question is not clear...

          F Offline
          F Offline
          ForNow
          wrote on last edited by
          #4

          I contacted Joseph Flounder and He explained That CAsyncSocket notifications OnSend, OnConnect are intitally received in the context of the main thread I detach the socket do a PostThreadMessage to the Thread with the CAsynsocket derived member do a Attach and from that point on all notification are received in The UI CWinThread

          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