Set priority for I/O jobs

192 views Asked by At

i wonder is there any API or hack to increase apps Process Priority on Raspberry Pi2 for make sure there is no IO change missed. And should i busy wait for time sensetive jobs?

1

There are 1 answers

0
Mohamed Yamama On BEST ANSWER

You may consider using Async and Await in your code.

If you specify that a method is an async method by using an Async or async modifier, you enable the following two capabilities.

  1. The marked async method can use Await or await to designate suspension points. The await operator tells the compiler that the async method can't continue past that point until the awaited asynchronous process is complete. In the meantime, control returns to the caller of the async method.

The suspension of an async method at an await expression doesn't constitute an exit from the method, and finally blocks don’t run.

  1. The marked async method can itself be awaited by methods that call it.

You can learn more from here: https://msdn.microsoft.com/en-us/library/hh191443.aspx