-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-Interop-coreclr
Milestone
Description
Background and Motivation
Proposed API
A callback when a flow comes back from unmanaged into managed code.
Usage Examples
BackToManaged += (sender, args) => {
Console.WriteLine($"Back from {args.StackTrace}");
};
BackToManagedInCurrentThread += (sender, args) => {
Console.WriteLine($"Back from {args.StackTrace}");
};The use case is working with COM objects where there are many entry points into managed code.
It allows to implement behavior similar to Thread.Abort but in a safe and controlled way.
Alternative Designs
Probably can be done with ComWrappers or Source Generators.
Risks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-Interop-coreclr