[wingide-users] Thread Safety and Scripting
ken at kenkinder.com
Thu Apr 7 13:29:49 EDT 2005
Wingware Support wrote:
> Don't use threads. If you need something to happen in the background,
> schedule it as an idle task; see the cvs.py script for an example.
> This should be (but isn't) documented.
> Our philosophy is not to use threads in almost all cases -- and as a
> result, we not spent any time debugging thread problems with the IDE
> itself (well, not quite, we have spent a few days pulling our hair out
> tracking down problems introduced by dll's being loaded into the
> process and starting threads ;).
> Threads do have their uses; I am not saying that threads should never
> be used. We made a decision not to use threads when developing Wing,
> which means that scripts cannot use threads.
I did see the CVS background call back example. The task I'm trying to
accomplish involves walking a directory tree and automatically adding
certain files to the project. The reason I wanted to use a thread wasn't
really that it is a background process in the sense that source analysis
is, but just that the GUI shouldn't become unresponsive while it happens.
It is probably fairly similar to the default Add Tree to Project
behavior. If I could look at that source code, it might be helpful. I
downloaded your NDA, but I don't see a number to fax it to? WingIDE
source code is still available for registered customers, right?
More information about the wingide-users