????????????薪???????????????
AsyncInvokeDel calculateAction = cal.Calculate; 
string resultStrAction = string.Empty; 
// int result1 = calculateAction.Invoke(123?? 456?? ref resultStrAction); 
IAsyncResult calculateResult1 = calculateAction.BeginInvoke(123?? 456?? ref resultStrAction?? null?? null); 
int result1 = calculateAction.EndInvoke(ref resultStrAction?? calculateResult1);

???????????????????

???????? Windows ????????????????????????????????????????????????????????????????????????????渭??????????????????????????? bug????????????????????????????????????????????????

??????????????些????锟�???????????????????????????.NET Framework ??????魏????????????????

????1???????????????????????????????????

????????????????械?????????????????????薪?Form??CheckForIllegalCrossThreadCalls????????????false??
// ????????????????????????????????????? 
// ??些???????????贸????????????System.Windows.Forms.Control.Handle????? 
// ???????????????????????? true??????? false?? 
public static bool CheckForIllegalCrossThreadCalls { get; set; }

????2??????????????

?????????????????????貌???????缃�?????????????????????貌??????????????????????校????????????????????????????????????????????写??????????????????械?????????????????????写?????????

????????????????????貌???????缃�??????????????????????????????????????????????????????????

????1?????BackgroundWork?????????????????AsyncOperationManager???AsyncOperation??????????????

????2?????TaskScheduler.FromCurrentSynchronizationContext() ??Task ????

????3?????Control????????Invoke ??BeginInvoke??????

??????????????IAsyncResult?????????????????????Invoke ??BeginInvoke???????????????

????Control???????ISynchronizeInvoke????????Invoke??BeginInvoke???????????????????GUI????????????
public interface ISynchronizeInvoke 

    // ????????????????????????????????????????? 
    bool InvokeRequired { get; } 
    // ?????????????????????????小? 
    AsyncResult BeginInvoke(Delegate method?? params object[] args); 
    object EndInvoke(IAsyncResult asyncResult); 
    // ??????????????????????????小? 
    object Invoke(Delegate method?? params object[] args); 
}