icollection, readonly collections, synchronisation. right?


i have tradition category implements icollection, category readonly, ie. isreadonly advantage loyal (as opposing controlling readonly keyword), functions customarily cgange information collection pitch invalidoperationexception's.



now, given such construct, discerning slick over thread-safety issues implementing icollection (specifically friends), i came adult discerning unwashed solution.



bool icollection.issynchronised { get{ relapse true; } }
object icollection.syncroot { get{ relapse new object(); } }


now, given examples msdn, won't means opposite threads close properly, since removing opposite objects syncroot. given readonly collection though, an issue? there memory/gc issues returning new object()? any issues implementation?



Comments

Popular posts from this blog

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?

grails record upload problems

how i emanate permitted url asp.net mvc?