KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am not too sure, so i thought i'd ask. Would removing and adding items to a System.Collections.Generic.List<> object be non-thread safe? My situation: When a connection is received, it is added to the list, but also at the same time, there's a worker that's removing dead connections and such. Is there a problem? Will a lock do? I also want to know if i'm allowed to use a lock on the list object with it's Foreach<> method.
Tags (comma-separated)
Save Edits
Cancel