c# - Wait without blocking for event to fire -


this question exact duplicate of:

edit: no, question has not been answered in post linked above.

if have pseudocode:

// stuff first wait until classname.eventname fires without blocking // rest of code 

is there way of doing in c# .net 4.0 ?

edit:

i have downloaded async targetting pack , trying that. (my project targetting .net 4.0.)

i've added code now.

private static async void waitasyncnoblock() {     await dynmapservlayer.isinitialized;                  } 

so called this.

// stuff first waitasyncnoblock(); // more stuff 

but error message, "cannot await bool."

if talking using await in code can in .net 4.5 can use async targeting pack microsoft add functionality .net 4.0 programs.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -