summaryrefslogtreecommitdiff
path: root/cs/demo/Ice/wpf/HelloWindow.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'cs/demo/Ice/wpf/HelloWindow.xaml.cs')
-rw-r--r--cs/demo/Ice/wpf/HelloWindow.xaml.cs14
1 files changed, 3 insertions, 11 deletions
diff --git a/cs/demo/Ice/wpf/HelloWindow.xaml.cs b/cs/demo/Ice/wpf/HelloWindow.xaml.cs
index 8cdf150a153..7d71975ab28 100644
--- a/cs/demo/Ice/wpf/HelloWindow.xaml.cs
+++ b/cs/demo/Ice/wpf/HelloWindow.xaml.cs
@@ -245,17 +245,9 @@ namespace Ice.wpf.client
private void flush_Click(object sender, RoutedEventArgs e)
{
- new System.Threading.Thread(new System.Threading.ThreadStart(delegate()
- {
- try
- {
- _communicator.flushBatchRequests();
- }
- catch(Ice.LocalException ex)
- {
- handleException(ex);
- }
- })).Start();
+ Ice.AsyncResult r = _communicator.begin_flushBatchRequests();
+ r.whenCompleted(handleException);
+
flush.IsEnabled = false;
status.Content = "Flushed batch requests";
}