mirror of
https://github.com/cyanfish/naps2.git
synced 2024-10-04 19:37:15 +03:00
Fix unused worker process on linux
This commit is contained in:
parent
f665d0a3da
commit
35998f07c0
@ -58,20 +58,20 @@ namespace NAPS2.Worker
|
||||
throw new Exception("Could not start worker process");
|
||||
}
|
||||
|
||||
if (PlatformCompat.System.CanUseWin32)
|
||||
{
|
||||
// TODO: Fix this on linux
|
||||
try
|
||||
{
|
||||
var job = new Job();
|
||||
job.AddProcess(proc.Handle);
|
||||
}
|
||||
catch
|
||||
{
|
||||
proc.Kill();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
if (PlatformCompat.System.CanUseWin32)
|
||||
{
|
||||
// TODO: Fix this on linux
|
||||
try
|
||||
{
|
||||
var job = new Job();
|
||||
job.AddProcess(proc.Handle);
|
||||
}
|
||||
catch
|
||||
{
|
||||
proc.Kill();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
proc.StandardOutput.Read();
|
||||
|
||||
@ -102,6 +102,10 @@ namespace NAPS2.Worker
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
if (!PlatformCompat.Runtime.UseWorker)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (_workerQueue == null)
|
||||
{
|
||||
_workerQueue = new BlockingCollection<WorkerContext>();
|
||||
|
Loading…
Reference in New Issue
Block a user