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

Threading

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
89 Posts 23 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.
  • B BarnaKol

    Look dude, What is of use to know how long it took you to understand and how many lines you wrote. What is of use to know how big heaps of messages you post in this forum.You dont have the actual solution lacks your merit. Why "Perhaps not as immediately useful as a full solution". Why not the full solution. My posts have also taught you how to post messages. Barna

    S Offline
    S Offline
    Stephen Hewitt
    wrote on last edited by
    #21

    I'm going to take brahmma's advice and stop arguing this issue after this post. But first I'll say this:  Your advice was bad, pure and simple. In fact it was very bad as it creates a class of bug that's very hard to track down and is nondeterministic. Now again I reiterate that I’m sorry if you got offended or embarrassed, but I’ve taught both you and potentially the OP a valuable lesson. I have spent as much time on this issue as I can afford to, I’m sorry if this isn’t good enough for you. There is no law that says I can only respond to the OP: the threads are hierarchical after all.

    Steve

    B 1 Reply Last reply
    0
    • R Rajesh R Subramanian

      It is better not to give any advice than giving bad advice. Is it too difficult for you to understand this?

      "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

      B Offline
      B Offline
      BarnaKol
      wrote on last edited by
      #22

      without guggling on the ideas come with a solution to the actual problem posted.

      1 Reply Last reply
      0
      • R Russell

        Here you can find a lot a information about threads: http://www.codeproject.com/threads/usingworkerthreads.asp[^] of course,...also the way to braek it in simple way.

        Cheers, Russell

        S Offline
        S Offline
        Sam_c
        wrote on last edited by
        #23

        Yeah I think all your answers and examples are going to be in that article. I hadn’t see that article before and I’m just going to read through it now and it looks pretty good. a little tip bit. 1) make sure that if you pause or stop a thread that you handle memory allocation and de-allocation. 2) try to avoid methods such as global variables to control threads and use of sleep() in a GUI based thread or thread that takes messages. Good looking article and well worth the read thanks for the link :)

        1 Reply Last reply
        0
        • B BarnaKol

          There is no point in any argument with persons or persons who does not know how to write a line of text. Any person with a civic sense moral attitude and good characteristics must have understood that till now.

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #24

          BarnaKol wrote:

          There is no point in any argument with persons or persons who does not know how to write a line of text. Any person with a civic sense moral attitude and good characteristics must have understood that till now.

          Then why in the hell are you replying to me, when I am not interested in talking to you any more and when I was speaking to Steve? This pretty much proves what I said. :)

          "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

          B 1 Reply Last reply
          0
          • R Rajesh R Subramanian

            BarnaKol wrote:

            It is always better to concentrate on the problem posted than comparing ideas

            Agreed. At the same time, when someone is giving a bad advice, we can point that out. Any sane person would realise his mistake, instead of arguing after giving wrong advice on a public forum.

            "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

            B Offline
            B Offline
            BarnaKol
            wrote on last edited by
            #25

            without guggling on the ideas come with a solution to the actual problem posted.

            R 1 Reply Last reply
            0
            • B BarnaKol

              without guggling on the ideas come with a solution to the actual problem posted.

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #26

              BarnaKol wrote:

              without guggling on the ideas come with a solution to the actual problem posted.

              When you are wrong, don't correct others. I will give a solution when I know it. I will not run around like you and give a solution that is erroneous.

              "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

              B 1 Reply Last reply
              0
              • S Stephen Hewitt

                I'm going to take brahmma's advice and stop arguing this issue after this post. But first I'll say this:  Your advice was bad, pure and simple. In fact it was very bad as it creates a class of bug that's very hard to track down and is nondeterministic. Now again I reiterate that I’m sorry if you got offended or embarrassed, but I’ve taught both you and potentially the OP a valuable lesson. I have spent as much time on this issue as I can afford to, I’m sorry if this isn’t good enough for you. There is no law that says I can only respond to the OP: the threads are hierarchical after all.

                Steve

                B Offline
                B Offline
                BarnaKol
                wrote on last edited by
                #27

                Why cant you come up with an actual solution to the problem. Have some ice cream or cold drink and sit down, get the solution,execute it,post it. I very well know you can. Dont get into brahmma's advice this will lead you to a bad heartattack.

                C 1 Reply Last reply
                0
                • R Rajesh R Subramanian

                  BarnaKol wrote:

                  without guggling on the ideas come with a solution to the actual problem posted.

                  When you are wrong, don't correct others. I will give a solution when I know it. I will not run around like you and give a solution that is erroneous.

                  "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                  B Offline
                  B Offline
                  BarnaKol
                  wrote on last edited by
                  #28

                  If I dont correct you how do you know that by the time you put a solution or at least show some way out the person himself will be able to solve it. I dont run around. But it seems you are running out.

                  R 1 Reply Last reply
                  0
                  • B BarnaKol

                    If I dont correct you how do you know that by the time you put a solution or at least show some way out the person himself will be able to solve it. I dont run around. But it seems you are running out.

                    R Offline
                    R Offline
                    Rajesh R Subramanian
                    wrote on last edited by
                    #29

                    I've been with this board for quite a while. I am active on the C++ forum and I help people, whenever I can. I do not mislead them. With your message count and the content of your messages, anyone who reads this message will be able to tell that you are nothing more than a stupid little troll. I stop talking to you here. Now, we have another Kyle. You can continue with your absurd little rant.

                    "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                    R B T 3 Replies Last reply
                    0
                    • R Rajesh R Subramanian

                      I've been with this board for quite a while. I am active on the C++ forum and I help people, whenever I can. I do not mislead them. With your message count and the content of your messages, anyone who reads this message will be able to tell that you are nothing more than a stupid little troll. I stop talking to you here. Now, we have another Kyle. You can continue with your absurd little rant.

                      "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                      R Offline
                      R Offline
                      Roger Stoltz
                      wrote on last edited by
                      #30

                      brahmma wrote:

                      I help people, whenever I can.

                      That's how it is done. CPians that can give the best advices usually already have an occupation that has priority over answering forum questions even if they want to. I know I have, even if that doesn't necessarily mean that I give the best advice. :->

                      brahmma wrote:

                      Now, we have another Kyle.

                      :laugh: Just what I thought while reading his posts. Regarding the original post: _Russell_ provided a link to what I consider to be the best starting point for everyone that wants to learn the concept of multithreading. The article also addresses why SuspendThread() has to be avoided and the chaos it may cause. Now drop this thread brahmma and have a nice remainder of the day. ;)


                      "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                      "High speed never compensates for wrong direction!" - unknown

                      R B 2 Replies Last reply
                      0
                      • R Roger Stoltz

                        brahmma wrote:

                        I help people, whenever I can.

                        That's how it is done. CPians that can give the best advices usually already have an occupation that has priority over answering forum questions even if they want to. I know I have, even if that doesn't necessarily mean that I give the best advice. :->

                        brahmma wrote:

                        Now, we have another Kyle.

                        :laugh: Just what I thought while reading his posts. Regarding the original post: _Russell_ provided a link to what I consider to be the best starting point for everyone that wants to learn the concept of multithreading. The article also addresses why SuspendThread() has to be avoided and the chaos it may cause. Now drop this thread brahmma and have a nice remainder of the day. ;)


                        "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                        "High speed never compensates for wrong direction!" - unknown

                        R Offline
                        R Offline
                        Rajesh R Subramanian
                        wrote on last edited by
                        #31

                        Roger Stoltz wrote:

                        Now drop this thread brahmma and have a nice remainder of the day. ;)

                        Thanks for your kind words, Roger. :)

                        "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                        B 1 Reply Last reply
                        0
                        • R Rajesh R Subramanian

                          I've been with this board for quite a while. I am active on the C++ forum and I help people, whenever I can. I do not mislead them. With your message count and the content of your messages, anyone who reads this message will be able to tell that you are nothing more than a stupid little troll. I stop talking to you here. Now, we have another Kyle. You can continue with your absurd little rant.

                          "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                          B Offline
                          B Offline
                          BarnaKol
                          wrote on last edited by
                          #32

                          Well you dont mislead anyone and too you dont get any solution.With your message count and the content of your messages, anyone who reads this message will be able to tell that you are nothing more than a stupid BIG troll. Again you are mistaken. Here you dont talk you post messges. I think you are both a stupid and and idiot. "Now, we have another Kyle." Yes the former was you.:laugh:

                          1 Reply Last reply
                          0
                          • R Roger Stoltz

                            brahmma wrote:

                            I help people, whenever I can.

                            That's how it is done. CPians that can give the best advices usually already have an occupation that has priority over answering forum questions even if they want to. I know I have, even if that doesn't necessarily mean that I give the best advice. :->

                            brahmma wrote:

                            Now, we have another Kyle.

                            :laugh: Just what I thought while reading his posts. Regarding the original post: _Russell_ provided a link to what I consider to be the best starting point for everyone that wants to learn the concept of multithreading. The article also addresses why SuspendThread() has to be avoided and the chaos it may cause. Now drop this thread brahmma and have a nice remainder of the day. ;)


                            "It's supposed to be hard, otherwise anybody could do it!" - selfquote
                            "High speed never compensates for wrong direction!" - unknown

                            B Offline
                            B Offline
                            BarnaKol
                            wrote on last edited by
                            #33

                            "Just what I thought while reading his posts." Again entered the route in the wrong way. Gone case. Yes you can understand pretty better as you and brahmma were the former Kyle. I think you are CPian first than a Homosapien.

                            1 Reply Last reply
                            0
                            • R Rajesh R Subramanian

                              Roger Stoltz wrote:

                              Now drop this thread brahmma and have a nice remainder of the day. ;)

                              Thanks for your kind words, Roger. :)

                              "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                              B Offline
                              B Offline
                              BarnaKol
                              wrote on last edited by
                              #34

                              Well you dont mislead anyone and too you dont get any solution.With your message count and the content of your messages, anyone who reads this message will be able to tell that you are nothing more than a stupid BIG troll. Again you are mistaken. Here you dont talk you post messges. I think you are both a stupid and and idiot. "Now, we have another Kyle." Yes the former was you. :-D

                              1 Reply Last reply
                              0
                              • H Hamid Taebi

                                Your code needs to a convertor to convert of managed code to unmanaged code :-D


                                WhiteSky


                                A Offline
                                A Offline
                                amitmistry_petlad
                                wrote on last edited by
                                #35

                                oh what reverse process :laugh: :omg:

                                "Success lies not in the result , But in the efforts !!!!!" Amit Mistry - petlad -Gujarat-India

                                H 1 Reply Last reply
                                0
                                • R Rajesh R Subramanian

                                  Steve, please stop arguing with him. Any person with a civic sense must have understood that what he did was a mistake by now. Ironically, he keeps arguing.

                                  "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                                  D Offline
                                  D Offline
                                  David Crow
                                  wrote on last edited by
                                  #36

                                  brahmma wrote:

                                  Ironically, he keeps arguing.

                                  Where's the irony? :confused:


                                  "A good athlete is the result of a good and worthy opponent." - David Crow

                                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                  R L 2 Replies Last reply
                                  0
                                  • D deeps_cute

                                    hi i have to run a thread when a button say ok is clicked. if the user press cancel threading should be exited. should not close the dialog. how to do this.

                                    Arise Awake Stop Not Till ur Goal is Reached.

                                    M Offline
                                    M Offline
                                    Mark Salsbery
                                    wrote on last edited by
                                    #37

                                    Soooo...did you get a solution? :rolleyes: :) Mark

                                    "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

                                    1 Reply Last reply
                                    0
                                    • D David Crow

                                      brahmma wrote:

                                      Ironically, he keeps arguing.

                                      Where's the irony? :confused:


                                      "A good athlete is the result of a good and worthy opponent." - David Crow

                                      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                                      R Offline
                                      R Offline
                                      Rajesh R Subramanian
                                      wrote on last edited by
                                      #38

                                      DavidCrow wrote:

                                      Where's the irony? :confused:

                                      Steve assumed that guy to be someone with a civic sense, but the guy kept coming back like a moron without accepting his mistake to prove that he is an idiot.

                                      [How not to ask a question]

                                      B 1 Reply Last reply
                                      0
                                      • A amitmistry_petlad

                                        oh what reverse process :laugh: :omg:

                                        "Success lies not in the result , But in the efforts !!!!!" Amit Mistry - petlad -Gujarat-India

                                        H Offline
                                        H Offline
                                        Hamid Taebi
                                        wrote on last edited by
                                        #39

                                        Its simple if you know managed programming you can convert it ;)


                                        WhiteSky


                                        T 1 Reply Last reply
                                        0
                                        • R Rajesh R Subramanian

                                          BarnaKol wrote:

                                          There is no point in any argument with persons or persons who does not know how to write a line of text. Any person with a civic sense moral attitude and good characteristics must have understood that till now.

                                          Then why in the hell are you replying to me, when I am not interested in talking to you any more and when I was speaking to Steve? This pretty much proves what I said. :)

                                          "The difficulty lies, not in the new ideas, but in escaping from the old ones." -- John Maynard Keyes, 1936

                                          B Offline
                                          B Offline
                                          BarnaKol
                                          wrote on last edited by
                                          #40

                                          Then why are you replying on me and my messages or the posts of mine. If you dont have anything to do then count the stars in the night sky. That fits you perfectly. You are nothing but a dam fool.:laugh:

                                          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