C#C
C#3y ago
SWEETPONY

✅ How to run task in separate process?

I wrote following logic
  var task = Task.Factory.StartNew( () =>
  {
      return _fileManagerClient.FileRegister(
          register: fileRegister,
          parameters: context.ToRequestParameters()
          );
  } );

  task.Start();
  task.Wait();


The first problem: I don't understand how to get the result of FileRegister, not Task
Is it correct way to run task in separate process?
Was this page helpful?