lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

"Erik Cassel" <> 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