On Wed, 18 Jan 2012 11:30:55 +0900 Carsten Haitzler (The Rasterman) <[email protected]> wrote:
> On Mon, 9 Jan 2012 00:18:38 +1000 David Seikel <[email protected]> > said: > > > On Sun, 8 Jan 2012 22:10:45 +0900 Carsten Haitzler (The Rasterman) > > <[email protected]> wrote: > > > > > On Sun, 8 Jan 2012 21:46:29 +1000 David Seikel <[email protected]> > > > said: > > > > > > because all the other callbacks come from code controlled by efl. > > > lua funcs come from code (script - lua) not controlled by efl. > > > > The host app callbacks would be setup by edje Lua on behalf of the > > host app (that was always my intention). So the edje Lua can > > register a wrapper function that it controls. Lua calls the > > wrapper function, which lets edje Lua decide what to do. So it > > becomes just like the other EFL callbacks, EFL is in control. > > yes - BUT it's called FROM a thread because LUA calls the registered > func. it has to be marshaled back to the main loop in a synchronous > way. LUA calls the registered function that is registered by edje, not the one registered by the host app. Edje then calls the host apps callback. Exactly the same as any other callback in EFL. It's no different. > > I'd still want an additional ability to register a type 1) function > > to just call back on the same thread. It would come with lots of > > documented warnings that it will screw things up in mysterious ways > > if used the wrong way, but then so does a lot of EFL. With power > > comes responsibility. > > i really don't like this as it is unknown if it is called form a > thread or not (depends on edje version). This is for the case where IT DOES NOT MATTER if it's called from a thread or not. Such cases do exist, and they are far more efficient to just call the function direct. It comes with a big warning, and if it's not used right, then the programmer gets spanked. We can't protect programmers from all their foolishness. I don't think we should straight jacket them for their own protection. We provide enough protection for the Lua programmers, it's the C programmers that are registering these callbacks, they know how dangerous their language is and deal with it all the time. > > > this of course will add overhead to this. async messages are much > > > more desirable as they allow both sides to not block. :) > > > > ONLY using messages is very undesirable from my point of view. I've > > seen the mess they can do when just a simple function call is > > needed. Messages have their uses, so do function calls. I want me > > cake and eat it to. lol > > but messages provide the best abstraction for also allowing > efficiency and 2-way communication. Message passing is not more efficient than direct function calls. Sometimes you need those direct function calls. I program in LSL, where you have to do this sort of message passing all the time. Trust me, sometimes you don't want to mess with that complicated shit, you just want a simple, fast function call. -- A big old stinking pile of genius that no one wants coz there are too many silver coated monkeys in the world.
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
