[IronPython] App stops responding, form won't refresh
fuzzyman at voidspace.org.uk
Wed May 26 14:44:19 PDT 2010
On 26/05/2010 22:40, robinsiebler wrote:
> This is my 1st IronPython/.NET app. It is really simple, all it does is zip
> all the files in a folder into an archive, 1 file per zip.
> The problem is that when it is zipping large files 200MB+ the app stops
> responding. It is still zipping files, but the UI doesn't update. I don't
> know how to fix this.
If you create a form and perform any activity on the same thread that
created the form then you will block until that activity is completed.
Instead you can create a background thread and post updates to the ui
from that thread by "invoking".
If you are using Windows Forms then you might find this example of
invoking onto the gui thread useful:
There is also an example of basic threading here:
All the best,
> The project is here -
> I think I need to add a thread to update the form, but all of my attempts
> have failed. Any help in this regard would be greatly appreciated.
READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.
More information about the Users