multithreading - c# how to pause between 2 function calls without stopping main thread -


c# how pause between 2 function calls without stopping main thread

foo(); foo(); // want run after 2 min without stopping main thread   function foo() { } 

thanks

try:

task.factory.startnew(() => { foo(); })     .continuewith(t => thread.sleep(2 * 60 * 1000))     .continuewith(t => { foo() }); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -