i have problem that two thread use one charactor pointer for string buffer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ±è¿ë°Ç

    i have problem that two thread use one charactor pointer for string buffer

    my project has critical bug that TTS(text to speech) engine has two thread
    one thread is socket thread that receives string from socket server and
    other thread
    is engine thread that processes the TTS(text to speech)

    the received string is dynamically allocated (char * pRcvstr)
    i think the bug occured when socket thread receives string buffer
    while engine thread processes the other TTS,
    because of two threads share one memory pointer

    how to manager the resource that using two thread?
    i thinked the criticalsection ,
    but this is useless overhead and has capability of other problem

    i need a simple solution


  • Victor Bazarov

    #2
    Re: i have problem that two thread use one charactor pointer for string buffer

    "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=blue]
    > my project has critical bug that TTS(text to speech) engine has two thread
    > one thread is socket thread that receives string from socket server and
    > other thread
    > is engine thread that processes the TTS(text to speech)[/color]

    In this paragraph the only two words relevant to this newsgroup are
    "bug" and "string". The rest has nothing to do with C++. Perhaps
    you should try comp.programmin g.threads...



    Comment

    • Victor Bazarov

      #3
      Re: i have problem that two thread use one charactor pointer for string buffer

      "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=blue]
      > my project has critical bug that TTS(text to speech) engine has two thread
      > one thread is socket thread that receives string from socket server and
      > other thread
      > is engine thread that processes the TTS(text to speech)[/color]

      In this paragraph the only two words relevant to this newsgroup are
      "bug" and "string". The rest has nothing to do with C++. Perhaps
      you should try comp.programmin g.threads...



      Comment

      • ±è¿ë°Ç

        #4
        Re: i have problem that two thread use one charactor pointer for string buffer

        thanks your advice
        i thinked the comp.lang.c++ group to all c++ related group

        "Victor Bazarov" <v.Abazarov@com Acast.net> wrote in message
        news:ZSIdc.1088 30$w54.775903@a ttbi_s01...[color=blue]
        > "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=green]
        > > my project has critical bug that TTS(text to speech) engine has two[/color][/color]
        thread[color=blue][color=green]
        > > one thread is socket thread that receives string from socket server and
        > > other thread
        > > is engine thread that processes the TTS(text to speech)[/color]
        >
        > In this paragraph the only two words relevant to this newsgroup are
        > "bug" and "string". The rest has nothing to do with C++. Perhaps
        > you should try comp.programmin g.threads...
        >
        >
        >[/color]


        Comment

        • ±è¿ë°Ç

          #5
          Re: i have problem that two thread use one charactor pointer for string buffer

          thanks your advice
          i thinked the comp.lang.c++ group to all c++ related group

          "Victor Bazarov" <v.Abazarov@com Acast.net> wrote in message
          news:ZSIdc.1088 30$w54.775903@a ttbi_s01...[color=blue]
          > "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=green]
          > > my project has critical bug that TTS(text to speech) engine has two[/color][/color]
          thread[color=blue][color=green]
          > > one thread is socket thread that receives string from socket server and
          > > other thread
          > > is engine thread that processes the TTS(text to speech)[/color]
          >
          > In this paragraph the only two words relevant to this newsgroup are
          > "bug" and "string". The rest has nothing to do with C++. Perhaps
          > you should try comp.programmin g.threads...
          >
          >
          >[/color]


          Comment

          • Victor Bazarov

            #6
            Re: i have problem that two thread use one charactor pointer for string buffer

            "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=blue]
            > thanks your advice
            > i thinked the comp.lang.c++ group to all c++ related group[/color]

            You thinked right. Your question was not C++ related.
            [color=blue]
            >
            > "Victor Bazarov" <v.Abazarov@com Acast.net> wrote in message
            > news:ZSIdc.1088 30$w54.775903@a ttbi_s01...[color=green]
            > > "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=darkred]
            > > > my project has critical bug that TTS(text to speech) engine has two[/color][/color]
            > thread[color=green][color=darkred]
            > > > one thread is socket thread that receives string from socket server[/color][/color][/color]
            and[color=blue][color=green][color=darkred]
            > > > other thread
            > > > is engine thread that processes the TTS(text to speech)[/color]
            > >
            > > In this paragraph the only two words relevant to this newsgroup are
            > > "bug" and "string". The rest has nothing to do with C++. Perhaps
            > > you should try comp.programmin g.threads...
            > >
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Victor Bazarov

              #7
              Re: i have problem that two thread use one charactor pointer for string buffer

              "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=blue]
              > thanks your advice
              > i thinked the comp.lang.c++ group to all c++ related group[/color]

              You thinked right. Your question was not C++ related.
              [color=blue]
              >
              > "Victor Bazarov" <v.Abazarov@com Acast.net> wrote in message
              > news:ZSIdc.1088 30$w54.775903@a ttbi_s01...[color=green]
              > > "±è¿ë°Ç" <ygkim@yujinrob ot.com> wrote...[color=darkred]
              > > > my project has critical bug that TTS(text to speech) engine has two[/color][/color]
              > thread[color=green][color=darkred]
              > > > one thread is socket thread that receives string from socket server[/color][/color][/color]
              and[color=blue][color=green][color=darkred]
              > > > other thread
              > > > is engine thread that processes the TTS(text to speech)[/color]
              > >
              > > In this paragraph the only two words relevant to this newsgroup are
              > > "bug" and "string". The rest has nothing to do with C++. Perhaps
              > > you should try comp.programmin g.threads...
              > >
              > >
              > >[/color]
              >
              >[/color]


              Comment

              Working...