Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Rtp_Theme has a deprecated constructor in /home/gotmopanel/public_html/nikgupta/wp-content/themes/rtpanel/admin/rtp-theme-options.php on line 21

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Rtp_Ogp has a deprecated constructor in /home/gotmopanel/public_html/nikgupta/wp-content/themes/rtpanel/admin/lib/rtp-deprecated.php on line 145
TPL | Nik's Blog TPL – Nik's Blog

Category: TPL

Fixing Patterns for Async MVVM Applications

Download the code here –AsyncCommands If you like this post you might also like an interesting post on Deadlocks while using tasks. This post is a follow up on Stephen Cleary’s excellent post on MSDN here which is a series of articles he wrote to explain how Tasks based patterns can be effectively adopted for GUI/MVVM applications. […]

Read More →

Deadlocks when using Tasks – solved

In my last post Deadlocks when using Tasks I explained how this innocent looking piece of code can cause a GUI app to deadlock and die. I proceeded to explain the reasons behind this behaviour. In this post I aim to discuss one possible solution to this problem and highlight some potential design considerations that you […]

Read More →

Deadlocks when using Tasks

What is wrong with this code? public static class NiksMessedUpCode { private static async Task DelayAsync() { await Task.Delay(1000); } public static void Test() { // Start the delay. var delayTask = DelayAsync(); // Wait for the delay to complete. delayTask.Wait(); } }   The code compiles without errors yet there is something really terrible […]

Read More →