[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Event driven programming
- From: RJP Computing <rjpcomputing@...>
- Date: Mon, 1 Jun 2009 21:21:13 -0400
On Mon, Jun 1, 2009 at 6:43 PM, Phoenix Sol <email@example.com>
I'm no computer scientist, but I think that event loops and coroutines can be used together quite nicely.
On Jun 1, 2009, at 2:35 PM, Linker <firstname.lastname@example.org
Event-driven is no a good choice for lua programming.Coroutine is a better choice.
I have been reading this post and hopping for a small example. Can someone explain if I have a C[++] thread that fires an event to Lua how it can "hook-up" in a thread safe way to the event? I would be fine with what ever work. No matter if it is coroutine or callbacks. I know the particular library I am trying to wrap uses callbacks, but the events can happen anytime. I tried to just call a registered Lua function, but I had thread safty issues because the event got fired while the main part of the script was running.