synchronization attribute

    Date: 01/11/06 (C Sharp)    Keywords: no keywords

    Let's say we have method like this:

    void DoIt()
    {
        lock (this) { DoItSafe(); }
    }
    Is there an attribute/keyword that, when applied to method DoIt, make it lock the instance without using lock inside? Like this:

    [MagicAttributeOrKeyword] 
    void DoIt() // works the same as the first snippet
    { 
        DoItSafe(); 
    } 

    Source: http://community.livejournal.com/csharp/47258.html

« Drawing a line on a form. || A system call that should... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home