Open sehe opened 13 years ago
I have the same problem when trying to use NGit on Windows. Calling the library results in my test application not exiting.
Basically when I use the API to try to clone a local git repository, the cloning works fine. However, the application never exits. In the current state NGit is not usable to build Git clients.
These issues have been fixed as far as I can tell. You shouldn't need to explicitly shut down the threads anymore. Please re-open the issue if you can reproduce hangs/deadlocks with the latest translated code.
After compiling the latest version of NGit from source, I could no longer reproduce the issue of the hanging threads. Looks fine to me.
Great, thanks for confirming that!
Hi Alan, has the ngit nuget package been updated with this fix? Asking because I just experienced this issue.
Edit: looks like it hasn't. Can it be updated?
I don't know who handles the nuget package. They'd need to be pinged to do a new release with all the fixes.
@xpaulbettsx The NGit nuget package is well out of date, can you updated it pls? Thx.
@alanmcgovern Any interest in taking over the nuget package ownership? I can do a PR with the nuspec bits, if @xpaulbettx will add you as package co-owner.
@damianh, i don't know much about the packaging side of nuget, but if it's not too complicated I don't mind keeping it updated.
Yeah, it's dead simple - a .nuspec file and an command line exe to create the package and upload to nuget.org.
Thx for the port too ;)
BatchingProgressMonitor's alarmQueue is preventing application exit with NGit.
The destructor of _object_87 is never called, causing the thread pool (alarmQueue in BatchingProgressMonitor) to hang indefinitely.
I have proof-of-concepted a workaround based on calling alarmQueue.ShutdownNow() explicitely, see here
http://stackoverflow.com/questions/6310691/some-ngit-stuff-prevents-c-application-from-shutting-down-correctly/6311193#6311193
Minimal failing example:
using the helper in BatchingProgressMonitor:
Tested platforms: