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. Other Discussions
  3. Clever Code
  4. myThread.ThreadState == ThreadState.Stopped

myThread.ThreadState == ThreadState.Stopped

Scheduled Pinned Locked Moved Clever Code
comcode-review
7 Posts 5 Posters 3 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.
  • M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #1

    is not equivalent to: myThread.ThreadState != ThreadState.Running Sigh. Because threads have other states, like suspended. Which it was entering waiting for an async read to finish. That was hosing up my graceful thread exit wait. Marc

    Thyme In The Country

    People are just notoriously impossible. --DavidCrow
    There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
    People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

    T D 2 Replies Last reply
    0
    • M Marc Clifton

      is not equivalent to: myThread.ThreadState != ThreadState.Running Sigh. Because threads have other states, like suspended. Which it was entering waiting for an async read to finish. That was hosing up my graceful thread exit wait. Marc

      Thyme In The Country

      People are just notoriously impossible. --DavidCrow
      There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
      People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

      T Offline
      T Offline
      Todd Smith
      wrote on last edited by
      #2

      You're supposed to tease us with the question and not answer it immediately. Otherwise its less fun :D

      Todd Smith

      M J 2 Replies Last reply
      0
      • T Todd Smith

        You're supposed to tease us with the question and not answer it immediately. Otherwise its less fun :D

        Todd Smith

        M Offline
        M Offline
        Marc Clifton
        wrote on last edited by
        #3

        Todd Smith wrote:

        You're supposed to tease us with the question and not answer it immediately.

        In the previous post, a couple people complained about that, so I decided not to. :) Marc

        Thyme In The Country

        People are just notoriously impossible. --DavidCrow
        There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
        People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

        P 1 Reply Last reply
        0
        • M Marc Clifton

          Todd Smith wrote:

          You're supposed to tease us with the question and not answer it immediately.

          In the previous post, a couple people complained about that, so I decided not to. :) Marc

          Thyme In The Country

          People are just notoriously impossible. --DavidCrow
          There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
          People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Yeah, but getting the answer before the problem wasn't very satisfying either.

          M 1 Reply Last reply
          0
          • P PIEBALDconsult

            Yeah, but getting the answer before the problem wasn't very satisfying either.

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #5

            PIEBALDconsult wrote:

            Yeah, but getting the answer before the problem wasn't very satisfying either.

            Ok, next time I'll do what someone else suggested. Post the problem, then a reply with the answer. That way, you're only tempted to cheat. :) Marc

            Thyme In The Country

            People are just notoriously impossible. --DavidCrow
            There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
            People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

            1 Reply Last reply
            0
            • M Marc Clifton

              is not equivalent to: myThread.ThreadState != ThreadState.Running Sigh. Because threads have other states, like suspended. Which it was entering waiting for an async read to finish. That was hosing up my graceful thread exit wait. Marc

              Thyme In The Country

              People are just notoriously impossible. --DavidCrow
              There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
              People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

              D Offline
              D Offline
              Daniel Turini
              wrote on last edited by
              #6

              Marc Clifton wrote:

              Sigh. Because threads have other states, like suspended. Which it was entering waiting for an async read to finish.

              Why aren't you using myThread.Join()? Better yet, most async operations return a sync object...

              1 Reply Last reply
              0
              • T Todd Smith

                You're supposed to tease us with the question and not answer it immediately. Otherwise its less fun :D

                Todd Smith

                J Offline
                J Offline
                John R Shaw
                wrote on last edited by
                #7

                I agree, this forum looks like it is going to be a lot of fun provided everyone states the problem (entertainment) and then provides the solution.

                I’ve taken the word 'impossible' out of my vocabulary, because it does not apply to software bugs.

                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