iasyncresult Questions

4

Solved

I am implementing an interface which requires implementations of BeginDoSomething and EndDoSomething methods. However my DoSomething isn't really long-running. For simplicity assume DoSomething on...
Rhizo asked 18/2, 2011 at 3:50

2

Solved

I need to create mechanism which waits IAsycnResult method till complete. How can i achieve this ? IAsyncResult result = _contactGroupServices.BeginDeleteContact( contactToRemove.Uri, ar => ...
Catima asked 22/5, 2015 at 7:51

3

Solved

I have an async method with the following signature: IAsyncResult BeginGetMyNumber(string foo, string bar, string bat, int bam, AsyncCallback callback, object state) I want to execute it using F...
Mortensen asked 23/3, 2013 at 1:42

2

Solved

Maybe it is a silly question. The Task class is declared this way: public class Task : IThreadPoolWorkItem, IAsyncResult, IDisposable The IAsyncResult interface is declared like this: public i...
Wolfhound asked 4/3, 2014 at 14:9

3

Solved

I've just come across IAsyncResult recently and have played with it for quite some time. What I'm actually wondering is why use IAsyncResult when we have a way better alternative ThreadPool there? ...
Roughrider asked 22/1, 2014 at 9:14

4

in a Silverlight-Windows Phone 7-project I am creating an HttpWebRequest, get the RequestStream, write something into the Stream and try to get the response, but I always get a NotSupportedExceptio...
Catholicon asked 12/11, 2010 at 15:36

2

I'm looking into adding some flexibility to a class that I've created which establishes a connection to a remote host and then performs an exchange of information (a handshake). The current impleme...
Edholm asked 18/5, 2009 at 18:40

1

Solved

How do I pass more than just the IAsyncResult into AsyncCallback? Example code: //Usage var req = (HttpWebRequest)iAreq; req.BeginGetResponse(new AsyncCallback(iEndGetResponse), req); //Method ...

2

Solved

Two questions on the callback pattern with AsyncCallback and IAsyncResult. I changed the question with a code example: using System; using System.Collections.Generic; using System.Text; namespac...
Distich asked 23/2, 2011 at 9:34

2

Solved

Is it OK to do heavy processing in .NET's asynchronous callbacks, hogging them for multiple seconds before returning? Or am I depriving the OS / the runtime of important resources? For example, co...
Straitjacket asked 11/1, 2011 at 3:20

1

Solved

I'm working with a NamedPipeServerStream to communicate between two processes. Here is the code where I initialize and connect the pipe: void Foo(IHasData objectProvider) { Stream stream = object...
Theater asked 7/4, 2010 at 18:58

1

Solved

I have written an async UDP client to talk to a server at my company. When I run on my developer machine all is well. When I deploy to another machine I get a socket exception on EndReceive the fir...
Otocyst asked 22/10, 2009 at 20:15

2

Solved

How can you block until an asynchronous event completes? Here is a way to block until the event is called by setting a flag in the event handler and polling the flag: private object DoAsynchronou...
Distillation asked 6/10, 2009 at 1:7

2

Andreas Huber's answer to this question gave me an idea to implement Concurrent<T> with async delegates instead of the ThreadPool. However, I am finding it harder to understand what's going o...
Moisesmoishe asked 2/1, 2009 at 14:30

3

Solved

I get confused with some terms while reading MSDN documents and code samples. What are callbacks in C#? In particular, what are synchronous and asynchronous callbacks ? Please explain these from ...
Janis asked 30/8, 2009 at 19:22

1

Solved

I use the Action<object>.BeginInvoke() method, does this use the thread pool or not? I have the following C# code: List<FileHash> hashList1 = hashList.Where((x, ind) => ind % 2 =...
Photogrammetry asked 14/1, 2009 at 13:44

2

Solved

I am generally wary of implementing interfaces partially. However, IAsyncResult is a bit of a special case, given that it supports several quite different usage patterns. How often do you use/see u...
Jag asked 1/1, 2009 at 23:4
1

© 2022 - 2024 — McMap. All rights reserved.