Results 1 to 2 of 2

Thread: what does it mean by "thread-safe procedure"

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    what does it mean by "thread-safe procedure"

    I was going thru the help on collection and I came across the following line
    "Enumerating through a collection is not a thread-safe procedure"

    what is thread-safe procedure..?

    thanks

  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Thread-safe means that the process will work correctly in a multithreaded application.

    The reason that iterating through a collection is noth thread safe is that it doesn't lock the collection so other threads can alter the collection while you are trawling through it (with hilarious consequences...not)
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width