Jeffrey, Do you have a recommended way to guard against the race condition you describe below? I want to use an async enumerator to first execute one async...
Jeffrey, Calling the AE synchronously was just a temporary measure until I could convert more of the surrounding code to the APM. And there's a lot of it to...
If you want to execute the first operation without a timeout at all, then just don't call SetCancelTimeout until after it competes before you initiate the...
There is only ever one thread in the iterator at any one time - this is ALWAYS guaranteed. -- Jeffrey Richter (http://Wintellect.com<http://wintellect.com/>) ...
Thank you for the response. Actually, in my case I *do* want a timeout on the first operation. Then, after that operation completes, I want to set a new...
You can get more information about it here: https://www.wintellect.com/Registration/Downloads/Effective_Threading_Syllabus_(9-10-2009).pdf I will be covering...
Jeffrey, In what timezone are you running the meeting? I assume Pacific Standard? I am GMT+10... Regards, Simon Dudley From: PowerThreading@yahoogroups.com...
Simon Dudley
Simon.Dudley@...
Aug 30, 2009 11:42 pm
594
September 10th-11th, 11:00 a.m. till 6:00 p.m. EASTERN TIME via Live Meeting -- Jeffrey Richter (http://Wintellect.com<http://wintellect.com/>) From:...
The exception is: An established connection was aborted by the software in your host machine The scenario: I set up a TcpListener on a machine that will have,...
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...
Hi, I'm struggling with using the library. Is there any way of creating a named mutex? Thanks, Paul...
Paul Cross
paul@...
Oct 13, 2009 12:56 pm
604
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...
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...
Paul Cross
paul@...
Oct 13, 2009 9:18 pm
606
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...