code_junkie

Managing ThreadPool starvation within a multithreaded work queue processor?

Nov 11th, 2011
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. public void FooCommand()
  2. {
  3. Future<int> BarFuture = new Future<int>( () => BarCommand() );
  4.  
  5. // Do Foo's Processing - Bar will (may) be running in parallel
  6.  
  7. int barResult = BarFuture.Value;
  8.  
  9. // More processing that needs barResult
  10. }
Add Comment
Please, Sign In to add comment