| 
      
      
      From: John L. <jla...@gm...> - 2006-12-25 02:08:03
      
     | 
| On 12/24/06, J=E9r=F4me VUARAND <jer...@gm...> wrote:
> 2006/12/24, John Labenski <jla...@gm...>:
> > What you're suggesting is not normal, it's better to have the system's
> > native mainloop control program flow rather than implementing your own
> > which will most likely be far less efficient. In any case you should
> > be able to do it using wxApp::Pending and wxApp::Dispatch.
>
> wxApp::Pending+wxApp::Dispatch seems to be exactly what I need.
>
> I don't know what your definition of normal is, but my question seems
> perfectly normal to me. What I want to achieve is to have several Lua
> frameworks working together in a single thread (because Lua is not
> thread safe). Each of my frameworks need to be updated several times a
> second, but I can't give application main loop control to any of
> these, so I need to make them cooperate.
Sounds good, I was just using "normal" in the sense that having lua
run the mainloop is a little like having the tail wag the dog. It
sounds like you're doing something a little more advanced though, good
luck.
You may still want to consider using wxEVT_IDLE though since I think
that's what is typically suggested on the C++ wxusers mailing list for
doing pseudo-threading like this.
Regards,
    John Labenski
 |