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#
  4. Threads and modules...

Threads and modules...

Scheduled Pinned Locked Moved C#
regexlounge
6 Posts 3 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.
  • A Offline
    A Offline
    Arish rivlin
    wrote on last edited by
    #1

    Hi all I cannot match between thread and process. Need to kill a cirtain thread, I know in general to what module the thread belongs but cannot distinct between the diffrent threads. all I get is a list of the threads ID that belong to my process....

    S 1 Reply Last reply
    0
    • A Arish rivlin

      Hi all I cannot match between thread and process. Need to kill a cirtain thread, I know in general to what module the thread belongs but cannot distinct between the diffrent threads. all I get is a list of the threads ID that belong to my process....

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

      Killing a thread is a bad idea in almost all cases. It can destabilise the entire process.

      Steve

      A 1 Reply Last reply
      0
      • S Stephen Hewitt

        Killing a thread is a bad idea in almost all cases. It can destabilise the entire process.

        Steve

        A Offline
        A Offline
        Arish rivlin
        wrote on last edited by
        #3

        I know...... I have no choise. It's not my module.......

        S 1 Reply Last reply
        0
        • A Arish rivlin

          I know...... I have no choise. It's not my module.......

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

          OK then, but it will end in tears!

          Steve

          A 1 Reply Last reply
          0
          • S Stephen Hewitt

            OK then, but it will end in tears!

            Steve

            A Offline
            A Offline
            Arish rivlin
            wrote on last edited by
            #5

            Can I, at least, configure to what modoule does a cirtin thread belongs to?

            L 1 Reply Last reply
            0
            • A Arish rivlin

              Can I, at least, configure to what modoule does a cirtin thread belongs to?

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              No I dont think so. AFAIK the managed threads are virtual, i.e. they are not even guaranteed to correspond to a physical (i.e. a Windows kernel) thread. This is somewhat illustrated by the fact that managed threads have a ManagedThreadId property, whose value does not correspond to the kernel's thread IDs; and it has a name, for which the kernel has no equivalent member at all. In my experience, there still is a 1-to-1 correspondence between a managed thread and a kernel thread, but I havent found any way to map them, other than having each managed thread call some native code to get its own kernel thread ID that is. Hope this clarifies things a bit.

              Luc Pattyn


              try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }


              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