"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Duplicati/Library/Utility/WorkerThread.cs" between
duplicati-2.0.5.104-2.0.5.104_canary_2020-03-25.tar.gz and duplicati-2.0.5.106-2.0.5.106_canary_2020-05-11.tar.gz

About: Duplicati is a backup client that securely stores encrypted, incremental, compressed backups on local devices, cloud storage services and remote file servers (for Windows, macOS and Linux). A remark: This officially "pre-release" seems to run stable.

WorkerThread.cs  (duplicati-2.0.5.104-2.0.5.104_canary_2020-03-25):WorkerThread.cs  (duplicati-2.0.5.106-2.0.5.106_canary_2020-05-11)
skipping to change at line 285 skipping to change at line 285
{ {
while (!m_terminate) while (!m_terminate)
{ {
m_currentTask = null; m_currentTask = null;
lock(m_lock) lock(m_lock)
if (m_state == WorkerThread<Tx>.RunState.Run && m_tasks.Coun t > 0) if (m_state == WorkerThread<Tx>.RunState.Run && m_tasks.Coun t > 0)
m_currentTask = m_tasks.Dequeue(); m_currentTask = m_tasks.Dequeue();
if (m_currentTask == null && !m_terminate) if (m_currentTask == null && !m_terminate)
if (m_state == WorkerThread<Tx>.RunState.Run)
m_event.WaitOne(); //Sleep until signaled
else
{ {
if (WorkerStateChanged != null) if (m_state == WorkerThread<Tx>.RunState.Run)
WorkerStateChanged(this, m_state); m_event.WaitOne(); //Sleep until signaled
else
//Sleep for brief periods, until signaled
while (!m_terminate && m_state != WorkerThread<Tx>.RunState.
Run)
m_event.WaitOne(1000 * 60 * 5, false);
//If we were not terminated, we are now ready to run
if (!m_terminate)
{ {
m_state = WorkerThread<Tx>.RunState.Run;
if (WorkerStateChanged != null) if (WorkerStateChanged != null)
WorkerStateChanged(this, m_state); WorkerStateChanged(this, m_state);
//Sleep for brief periods, until signaled
while (!m_terminate && m_state != WorkerThread<Tx>.RunSt
ate.Run)
m_event.WaitOne(1000 * 60 * 5, false);
//If we were not terminated, we are now ready to run
if (!m_terminate)
{
m_state = WorkerThread<Tx>.RunState.Run;
if (WorkerStateChanged != null)
WorkerStateChanged(this, m_state);
}
} }
} }
if (m_terminate) if (m_terminate)
return; return;
if (m_currentTask == null && m_state == WorkerThread<Tx>.RunStat e.Run) if (m_currentTask == null && m_state == WorkerThread<Tx>.RunStat e.Run)
lock(m_lock) lock(m_lock)
if (m_tasks.Count > 0) if (m_tasks.Count > 0)
m_currentTask = m_tasks.Dequeue(); m_currentTask = m_tasks.Dequeue();
 End of changes. 4 change blocks. 
14 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)