mostlylucid

scott galloway's personal blog...
posts - 897, comments - 700, trackbacks - 11

My Links

News

Archives

Post Categories

Misc. Coding

Threading update...what I actually do...

Should mention I suppose the I lied in yesterdays post on threading using .NET...mea cupla :-). In that post I mentioned using delegates for multi-threading and said that you always had to use EndInvoke to avoid a memory leak...well not quite, what i actually do is use the excellent AsyncHelper class by Mike Woodring, this supports this syntax:

CalcAndDisplaySumDelegate d = new CalcAndDisplaySumDelegate(someCalc.Add);
    AsyncHelper.FireAndForget(d, 2, 3);

No EndInvoke required as it takes care of this using a DynamicInvoke internally. Well, saves a few lines of code!

Print | posted on Monday, May 24, 2004 5:03 PM | Filed Under [ .NET Multi-Threading ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 6 and 7 and type the answer here:

Powered by: