Ignore:
Timestamp:
2/8/2010 7:29:41 AM (2 years ago)
Author:
lowjoel
Message:

Updated to trunk r1764

Location:
branches/eraser6/CodeReview
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/CodeReview

  • branches/eraser6/CodeReview/Eraser.Manager/DirectExecutor.cs

    r1767 r1769  
    5555                thread.Abort(); 
    5656                schedulerInterrupt.Set(); 
     57 
     58                //Wait for the executor thread to exit -- we call some event functions 
     59                //and these events may need invocation on the main thread. So, 
     60                //pump messages from the main thread until the thread exits. 
     61                if (System.Windows.Forms.Application.MessageLoop) 
     62                { 
     63                    if (!thread.Join(new TimeSpan(0, 0, 0, 0, 100))) 
     64                        System.Windows.Forms.Application.DoEvents(); 
     65                } 
     66 
     67                //If we are disposing on a secondary thread, or a thread without 
     68                //a message loop, just wait for the thread to exit indefinitely 
     69                else 
     70                    thread.Join(); 
     71 
    5772                schedulerInterrupt.Close(); 
    5873            } 
     
    615630                            "not be erased because the file was either compressed, encrypted or " + 
    616631                            "a sparse file.", info.FullName), LogLevel.Error)); 
     632                        continue; 
    617633                    } 
    618634 
Note: See TracChangeset for help on using the changeset viewer.