Trying to write non blocking code, failing

Have a look at TaskMacros. They allow to "unblock" your code without heavy rewrite.