Hi All, I was wondering if I issue a yield return 0, will the AE behave just like it does for yield return <X != 0> especially with the synchronization...
Yield return 0 causes the AE to immediately call your iterator back by posting (not sending) a notification to the current SyncContext. If there is no...
Thanks for the answer Jeffrey. Will "yield return <x != 1>" call me back using Send (as opposed to Post)? And for a well implemented sync-context I don't have...
I never call Send, I always call Post to keep things happening asynchronously. Yield returning x where x is >0 means that I don't call your iterator right...
Great, that answers my questions. Thank you Jeff! From: PowerThreading@yahoogroups.com [mailto:PowerThreading@yahoogroups.com] On Behalf Of Jeffrey Richter...
I've been doing a lot of work with the new Task class that ships with .NET 4.0 as I've been revising my CLR via C# book (due out in early 2010). Task are...
603
Paul Cross
paul@...
Oct 13, 2009 12:56 pm
Hi, I'm struggling with using the library. Is there any way of creating a named mutex? Thanks, Paul...
Usually, developers name a mutex so that it can be shared across process or AppDomain boundaries. However, my ResourceLock base class contains state that is...
605
Paul Cross
paul@...
Oct 13, 2009 9:18 pm
Thanks Jeffrey. I'm managing concurrent access to an old-school out-of-proc COM server so the standard .NET Mutex was the route I followed. All working fine...
I'm thinking of adding a feature to my AsyncEnumerator that would allow you to register two delegates with each AE object. The first "SuspendCallback delegate"...
Hi Jeffrey, your proposal looks interesting. On Wed, Oct 21, 2009 at 17:48, Jeffrey Richter (Wintellect LLC) ... From top of my head, what about some time...
I'am using AsyncEnumerator to marshall calls into code paths that ultimately touch COM components, Wndows Imaging Components (WIC) to be exact. Calls to COM...
The AsyncEnumerator never creates or spawns any thread on its own. I have not had to do what you are trying to do but what ever you would normally do should...
I'm playing around with the TcpServer example, and discovered that if the client terminated unexpectedly, TcpServer throw an exception inside Process() method...
The exception is being thrown from with9in an EndXxx method. You just have to put the EndXxx method in a try block and then you can catch the SocketException. ...
I think I need a better understanding the AsyncCallback parameter of AsyncEnumerator.BeginExecute(). I understand that to be a callback method that the ae will...
You are right about everything. If you care about catching an unhandled exception thrown from within the iterator, you need a try around the EndExecute method...
I have designed a class that acts like Figure 2 in your article http://msdn.microsoft.com/en-us/magazine/cc721613.aspx (except I'm working with a Windows Form...
Yes, as my code in Figure 2 of the article is written, there would be a problem if m_webSiteDataLength is overwritten. To address this, my AsyncEnumerator has...
Is there sample code available that shows how to use Wintellect.Threading.Singleton<T>? I'm interested to understand how a generic singleton works -- can't...
When you construct a Singleton<T>, you pass it a delegate that refers to code that returns a T. The Singleton class ensures that a lock is taken around...
OK, I fixed all the links in my document but I haven't uploaded the new version yet. Thanks for letting me know about it. MSDN changed a bunch of stuff...
Wow, great news! In the future, it will be interesting to make some perf test between the current version and the one that will use .NET 4.0 stuff internally!...
Yes, the TPL offers work-stealing queues but these are only for compute-bound operations and, in fact, only work with the new Task class. The AsyncEnumerator...
So I'm interested in your comment about 'having a change of heart about some things.' I just took your class a month or two ago, and am in the process of...
Hi Jeffrey, I am excited to hear about these features. I think they work great for debugging for sure. And I would use ResumeCallback for copying the thread...
I haven't given cancelation much thought yet and I haven't tried coding anything up yet. The AsyncEnumerator already supports cancellation. I would just...