KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Take the following classes as an example. public class A { // ... void Foo(S myStruct){...} } public class B { public A test; // ... void Bar() { S myStruct = new S(); test.Foo(myStruct); } } Now, I want the method-call test.Foo(myStruct) to be an asynchronous call ('fire-and-forget'). The bar-method needs to return as soon as possible. Documentation around delegates, BeginInvoke, EndInvoke, the ThreadPool etc. isn't helping me find a solution. Is this a valid solution? // Is using the `EndInvoke` method as the callback delegate valid? foo.BeginInvoke(myStruct, foo.EndInvoke, null);
Tags (comma-separated)
Save Edits
Cancel