OSDN Git Service

PATCH: [ 860072 ] Allow singlethreaded diffs
authorPerry Rapp <elsapo@users.sourceforge.net>
Fri, 9 Jan 2004 01:01:49 +0000 (01:01 +0000)
committerPerry Rapp <elsapo@users.sourceforge.net>
Fri, 9 Jan 2004 01:01:49 +0000 (01:01 +0000)
Src/DiffThread.cpp
Src/readme.txt

index 3c69d44..aa1176c 100644 (file)
 #include "Plugins.h"
 
 
+// Set this to true in order to single step
+// through entire compare process all in a single thread
+// Either edit this line, or breakpoint & change it in CompareDirectories() below
+static bool bSinglethreaded=false;
+
+
 /**
  * @brief Data sent to diff thread
  */
@@ -118,7 +124,16 @@ UINT CDiffThread::CompareDirectories(CString dir1, CString dir2, BOOL bRecursive
        m_bAborting = FALSE;
 
        m_pDiffParm->nThreadState = THREAD_COMPARING;
-       m_thread = AfxBeginThread(DiffThread, m_pDiffParm);
+
+       if (bSinglethreaded)
+       {
+               DiffThread(m_pDiffParm);
+       }
+       else
+       {
+               m_thread = AfxBeginThread(DiffThread, m_pDiffParm);
+       }
+
        return 1;
 }
 
index 29ce8be..e45e2e3 100644 (file)
@@ -4,6 +4,8 @@
  PATCH: [ 862040 ] CAssureScriptsForThread like WaitCursor
   WinMerge: DiffThread.cpp FileTransform.cpp Merge.cpp Merge.h
    MergeEditView.cpp Plugins.cpp Plugins.h SelectUnpackerDlg.cpp
+ PATCH: [ 860072 ] Allow singlethreaded diffs
+  WinMerge: DiffThread.cpp
 
 
 2004-01-08 Kimmo