• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Whats the object lock thingy called for synchonization??

    Discussion in 'Archives' started by Vastico, Sep 10, 2011.

    1. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      Whats the object lock thingy called for synchonization??

      Getting this error:
      Code:
      [13:31:04:576] System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
         at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
         at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
         at Styx.Plugins.PluginWrapper.Pulse()
      I can't remember the lock to sync it, anyone got any ideas?
       
    2. MrBig

      MrBig Member

      Joined:
      Jan 25, 2010
      Messages:
      419
      Likes Received:
      5
      Trophy Points:
      18
      Mutex?
       
    3. Apoc

      Apoc Moderator Staff Member Moderator

      Joined:
      Jan 16, 2010
      Messages:
      2,790
      Likes Received:
      94
      Trophy Points:
      48
      What exactly are you trying to modify?

      And no, mutex isn't what he's looking for.
       
    4. Vastico

      Vastico New Member

      Joined:
      Jul 28, 2011
      Messages:
      424
      Likes Received:
      10
      Trophy Points:
      0
      Doesn't matter anymore I corrected problem, it wasn't synchronization I was enumerating through a list and checking then removing it while in the enumeration.
       
    5. ridiculous

      ridiculous New Member

      Joined:
      Aug 13, 2011
      Messages:
      22
      Likes Received:
      0
      Trophy Points:
      0
      Yea just loop through it from end to start ;p
       
    6. MrBig

      MrBig Member

      Joined:
      Jan 25, 2010
      Messages:
      419
      Likes Received:
      5
      Trophy Points:
      18
      Or use a normal FOR instead of FOREACH
       

    Share This Page