<div dir="ltr"><div><div>Hi,<br><br>Specially in the mobile world, there are many platforms that force the developer to think and code its applications around events. Sometimes this is done with virtual functions or interface implementation, overriding methods, or plain C-style callbacks.<br>

<br></div>The problem is, in any of these cases, generally the main loop is controlled by the application. Since Gambit runs within the ___setup(params) function, and then quits (expecting ___cleanup() to be called), there is no way to easily adapt to this architecture except for running in a separate thread and communicating through messages or shared data.<br>

<br></div>Is there a better way to do this?<br><div><br><br></div><div>Best regards,<br><br clear="all"><div><div><div><div dir="ltr"><br><br><span style="font-family:verdana,sans-serif">        </span><span style="font-family:verdana,sans-serif"><font size="1">Álvaro Castro-Castilla</font></span><span style="font-family:verdana,sans-serif"><font size="1"><br>

</font></span><span style="font-family:verdana,sans-serif"><font size="1">          D</font></span><span style="font-family:verdana,sans-serif;font-size:x-small">igital Experiences.</span><span style="font-family:verdana,sans-serif;font-size:x-small">   </span><span style="font-family:verdana,sans-serif;font-size:x-small">--   </span><a href="http://blog.fourthbit.com/" style="font-family:verdana,sans-serif;font-size:x-small" target="_blank">visit The Blog</a><br clear="all">



<span style="font-family:verdana,sans-serif"></span><div><span style="font-family:verdana,sans-serif"><font size="1"><br>

</font></span></div><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div><span style="font-family:verdana,sans-serif"><font size="1"><a href="http://fourthbit.com" target="_blank"><img src="https://s3.amazonaws.com/fourthbit-main/logo_inverted.png"></a><br>

<br>

</font></span></div></blockquote></div></div>
</div></div></div></div>