If I continuously launch several Task.Run(method) that may block, is there a way to discover (or cache for later cancelling) the tasks that are blocked waiting for example for a lock{}, or a Waitone() inside method ?
So for example, if I say:
Task.Run(() =>
{
TradingSystem.QuoteUpdate(quote); //QuoteUpdate may block for several reasons
});
How do I later cancel only those tasks that are executing exactly the method TradingSystem.QuoteUpdate and have not run to completion?