lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] NightOwl888 commented on issue #256: Port ConditionalWeakTable from .NET Core 3.x to .NET Standard 2.0
Date Fri, 09 Oct 2020 14:13:34 GMT

NightOwl888 commented on issue #256:

   Thanks. [An attempt](
has already been made on this. The blocker is the fact that it depends on [DependentHandle](
which has native resources.
   `DependentHandle` calls native methods using `[MethodImpl(MethodImplOptions.InternalCall)]`.
           private static extern IntPtr nInitialize(object primary, object? secondary);
           private static extern object? nGetPrimary(IntPtr dependentHandle);
           private static extern object? nGetPrimaryAndSecondary(IntPtr dependentHandle, out
object? secondary);
           private static extern void nSetPrimary(IntPtr dependentHandle, object? primary);
           private static extern void nSetSecondary(IntPtr dependentHandle, object? secondary);
           private static extern void nFree(IntPtr dependentHandle);
    It is not currently known how to translate that into a call that can be done from a 3rd
party library such as J2N. Some important questions to answer:
   - Can we assume the native method exists for the current platform, since .NET Standard
should "just work"?
   - Do we need to bundle the native resources in J2N to call them?
   - If we need to bundle native resources, do they work on all platforms or do we need separate
builds for specific platforms?
   Note that `[MethodImpl(MethodImplOptions.InternalCall)]` doesn't exist on .NET Standard
1.x, but it is probably time to drop support for that target, anyway.

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message