mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Removed some Shutdown/Terminate functions in favor of Dispose
This commit is contained in:
parent
179ac2b0ee
commit
03c88b0f38
@ -85,15 +85,10 @@ namespace Wabbajack.Common
|
||||
Queue.Add(a);
|
||||
}
|
||||
|
||||
public void Shutdown()
|
||||
public void Dispose()
|
||||
{
|
||||
_cancel.Cancel();
|
||||
Threads.Do(th => th.Join());
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Shutdown();
|
||||
Queue?.Dispose();
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,6 @@ namespace Wabbajack.Lib
|
||||
{
|
||||
public WorkQueue Queue { get; private set; }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Queue?.Shutdown();
|
||||
}
|
||||
|
||||
public Context VFS { get; private set; }
|
||||
|
||||
protected StatusUpdateTracker UpdateTracker { get; private set; }
|
||||
@ -109,10 +104,10 @@ namespace Wabbajack.Lib
|
||||
return _tcs.Task;
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
public void Dispose()
|
||||
{
|
||||
_cancel.Cancel();
|
||||
Queue?.Shutdown();
|
||||
Queue?.Dispose();
|
||||
_isRunning.OnNext(false);
|
||||
}
|
||||
}
|
||||
|
@ -36,12 +36,5 @@ namespace Wabbajack.Lib
|
||||
/// Begin processing
|
||||
/// </summary>
|
||||
Task<bool> Begin();
|
||||
|
||||
/// <summary>
|
||||
/// Terminate any processing currently in progress by the processor. The processor should be disposed of
|
||||
/// after calling this function as processing cannot be resumed and the tasks may be half completed.
|
||||
/// Should only be called while IsRunning = true;
|
||||
/// </summary>
|
||||
void Terminate();
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ namespace Wabbajack.Test.ListValidation
|
||||
[TestCleanup]
|
||||
public void Cleanup()
|
||||
{
|
||||
Queue.Shutdown();
|
||||
Queue.Dispose();
|
||||
Queue = null;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ namespace Wabbajack.Test
|
||||
[TestCleanup]
|
||||
public void Cleanup()
|
||||
{
|
||||
Queue.Shutdown();
|
||||
Queue.Dispose();
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
Loading…
Reference in New Issue
Block a user