Changeset 3266 for trunk/sources
- Timestamp:
- 04/05/10 05:53:30 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/AsynchronousContentView.cs
r3250 r3266 28 28 IAsyncResult result = BeginInvoke(method); 29 29 result.AsyncWaitHandle.WaitOne(1000, false); 30 if (result.IsCompleted) EndInvoke(result);30 if (result.IsCompleted) try { EndInvoke(result); } catch (ObjectDisposedException) { } 31 31 else { 32 32 ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle, 33 new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch ( InvalidOperationException) { } }),33 new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch (ObjectDisposedException) { } }), 34 34 null, -1, true); 35 35 } … … 45 45 IAsyncResult result = BeginInvoke(method, args); 46 46 result.AsyncWaitHandle.WaitOne(1000, false); 47 if (result.IsCompleted) EndInvoke(result);47 if (result.IsCompleted) try { EndInvoke(result); } catch (ObjectDisposedException) { } 48 48 else { 49 49 ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle, 50 new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch ( InvalidOperationException) { } }),50 new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch (ObjectDisposedException) { } }), 51 51 null, -1, true); 52 52 }
Note: See TracChangeset
for help on using the changeset viewer.