[IronPython] Threading question on IP and Avalon (WPF)

Keith J. Farmer kfarmer at thuban.org
Mon Nov 21 19:52:56 CET 2005

I don't suppose something as simple as Thread.Sleep(1) would prompt a



Keith J. Farmer

kfarmer at thuban.org


From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Steven Drucker
Sent: Monday, 21 November 2005 10:00
To: users-ironpython.com at lists.ironpython.com
Subject: [IronPython] Threading question on IP and Avalon (WPF)


This is probably more a WPF question rather than IronPython, but here

I'm using WPF to do some drawing from IP and it only updates when the IP
thread is idle (waiting for an input).  What I'd like to do is be able
to set some interface elements (like a textblock) with text indicating
the progress along a fairly involved activity. While I can set the text
from within IP, it only shows the results when the entire activity is
done, and the IP prompt is idle.

While I have had some limited success in spawning a second thread and
processing activity there and calling back into the
Application.Dispatcher to change the interface elements, this makes the
programming model MUCH more complicated for the activities that I'm
trying to get done. Is there a relatively simple solution? Perhaps an
'update' call that I can make this will make sure that the WPF interface
is up-to-date? Or a different priority level on which to be calling the
IP main thread?




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20051121/b8bd8f30/attachment.html>

More information about the Ironpython-users mailing list