Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling Fdb.Stop() throws PlatformNotSupportedException #133

Open
KrzysFR opened this issue Dec 20, 2023 · 0 comments
Open

Calling Fdb.Stop() throws PlatformNotSupportedException #133

KrzysFR opened this issue Dec 20, 2023 · 0 comments
Labels

Comments

@KrzysFR
Copy link
Member

KrzysFR commented Dec 20, 2023

The network thread is executed from a dedicated managed thread that is created at the start, and calls into fdb_run_network.

To stop it, the c# code calls fdb_stop_network and, hopefully, the fdb_run_network should eventually return and give back control to the CLR.

The current code does wait for up to 5 seconds, before calling thread.Abort() and then thread.Join(30sec).

The issue is that Thread.Abort() is deprecated and not supported in .NET anymore, and calling Abort() will throw a PlatformNotSupportedException.

Calling abort on the managed thread would not really do anything anyway because it cannot pass through this event to the native, so I don't think it helps much, so it could probably be removed altogether.

@KrzysFR KrzysFR added the bug label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant