void EcoreCallbackManager::Stop() { // make sure we're not called twice DALI_ASSERT_DEBUG( mRunning == true ); // lock out any other call back functions boost::unique_lock< boost::mutex > lock( mMutex ); mRunning = false; // the synchronous calls return data from the callback, which we ignore. ecore_main_loop_thread_safe_call_sync(MainRemoveAllCallback, this); }
// BEGIN - code running in my custom pthread instance // static void * my_thread_run(void *arg) { double t = 0.0; for (;;) { struct info *inf = malloc(sizeof(struct info)); if (inf) { inf->x = 200 + (200 * sin(t)); inf->y = 200 + (200 * cos(t)); ecore_main_loop_thread_safe_call_sync (my_thread_mainloop_code, inf); } // and sleep and loop usleep(1000); t += 0.02; } return NULL; }