cefsharp/CefSharp — pull request #289 by JanEggers (2014-03-23 08:13:42+00:00)
Title: Task pattern

i merged some of the changes i did from my private branch.

this checkin contains the new TaskScheduler to post tasks into CEF Threads from managed code.

a sample usage example for JavaScript calls. I reverted All the changes in the API in WebView so they behave like they did before (except that timeout actually works now). I would prefer to return the task as i did before because that way the user has more freedom if he wants to wait at all or use continuewith and so on.

also i adjusted the api as FrameId is long not int which triggered a warning somewhere.

this pattern could be applied to customschemehandlers and Cookie handling, with the benefit that we can remove some more locks / events and make thinks real async. and its more errorsafe for the customschemehandlers because the user does not have to invoke continuecallback which might not be called when exceptions are thrown in his code resulting in a deadlock.