[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Resuming a co-routing with an exception
- From: David Kastrup <dak@...>
- Date: Fri, 23 Oct 2009 19:47:16 +0200
"Erik Cassel" <erik@roblox.com> writes:
>
>
> I have defined an asynchronous function in C that yields the current thread and
> then resumes it when the operation completes. If the function succeeds, then I
> push the result onto the stack and call lua_resume().
>
>
>
> What can I do in case of an exception? I?d love to somehow cause an exception
> to be thrown into the resumed thread, but I don?t see an easy way to do this.
The default behavior of coroutine.wrap is not helpful here?
--
David Kastrup