What's the best way to achieve a multi-point for an audio converter?



  • I'm reading this wonderful article on multi-pointness in C# https://rsdn.ru/article/dotnet/CSThreading1.xml and http://rsdn.ru/article/dotnet/CSThreading2.xml And a little lost. There's no way she's going through the C#, and it's easy. Threadand through BackgroundWorkerand through ThreadPool♪ ♪ ♪

    Allow me to make an audio converter where the user could choose the number of flows (up to eight) and who would have made progress in the implementation bar. How does C# (NET 4.0) take this?



  • ThreadThreadPoll and BackgroundWorker are designed to carry out different tasks.

    ThreadPool - it's a way to do small, short tasks.

    Thread - it's a manual flow class.

    BackgroundWorker - it's a way to do it in the background. One It is a long task to reflect its progress on UI.

    In your case, it would probably be possible to come in... Tasklaunched with https://msdn.microsoft.com/en-us/library/system.threading.tasks.taskcreationoptions(v=vs.110).aspx ♪ Use https://msdn.microsoft.com/en-us/library/system.threading.cancellationtoken(v=vs.110).aspx to stop them on demand and https://msdn.microsoft.com/en-us/library/hh193692(v=vs.110).aspx to reflect the overall progress of UI.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2