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. Problem with Context Switch Deadlock

Problem with Context Switch Deadlock

Scheduled Pinned Locked Moved C#
performancehelpmobiledotnetcom
2 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.
  • C Offline
    C Offline
    cnr369
    wrote on last edited by
    #1

    Hi All, While am working for more that 5min.am getting aproblem as below... The CLR has been unable to transition from COM context 0x192008 to COM context 0x192158 for 60seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. so plz help me how to solve the problem to run the application for more than 20min. Thanks in advance, Rgds, cnr369.

    S 1 Reply Last reply
    0
    • C cnr369

      Hi All, While am working for more that 5min.am getting aproblem as below... The CLR has been unable to transition from COM context 0x192008 to COM context 0x192158 for 60seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations. so plz help me how to solve the problem to run the application for more than 20min. Thanks in advance, Rgds, cnr369.

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      The error message means that one of your STA apartments is not pumping i.e it has blocked without processing incoming messages. Look for methods with the [STAThread] attribute and check if they are pumping.

      Regards Senthil [MVP - Visual C#] _____________________________ My Blog | My Articles | WinMacro

      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