http://bugzilla.moblin.org/show_bug.cgi?id=6378
--- Comment #15 from yongsheng zhu <yongsheng.zhu(a)intel.com> 2010-02-23 22:51:20
PST ---
The main issue I want to raise here is: how to schedule requests from dbus
clients and auto sync tasks?
autosync tasks are put in a queue and are executed one by one.
The main logic here is:
while (!shutdownRequested) {
// if no active session or no auto sync
task, wait
// m_autoSync here manages automatic sync
if ((!m_activeSession ||
!m_activeSession->readyToRun()) &&
!m_autoSync.hasTaskToRun()) {
g_main_loop_run(m_loop);
}
// do sync for dbus clients
if (m_activeSession &&
m_activeSession->readyToRun()) {
...
} else if( m_autoSync.hasTaskToRun()) {
//do automatic run
...
//give an opportunity to handle dbus clients requests or others
immediately again, that's because auto sync task list may have more than one
task
g_main_loop_iteration(m_loop, false);
}
}
The reason why merging automatic sync into existing sessions handling, that's
because there are many difference between them, for example sending progress,
password requests, dbus client info binding, etc.
--
Configure bugmail:
http://bugzilla.moblin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching someone on the CC list of the bug.