nathanAjacobs
Explore posts from serversManaged callback to native code (reverse p/invoke)
Okay I asked a LLM and it says this:
"When you pass a managed delegate to native code via P/Invoke, the CLR automatically generates a thunk (a small, fixed bridge between native and managed code). This thunk has a fixed address in memory, even if the delegate or its target object (ManagedClass) is moved by the GC."
Is this true?
11 replies
Would this AsyncQueue have issues with multiple producers and a single consumer?
Yeah that is what I thought, I think there are no issues.
I think it would only be a problem if there were multiple consumers since I think the semaphore and dequeue operation could get out of sync
18 replies
How can I reference multiple generics in summary?
So this is definitely a hack, as it requires a non generic type to exist and it obviously links to that non generic type if clicked on. This at least gets the highlighting correct though in the summary when hovering over the method in Visual Studio.
14 replies