links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Single-threaded Code Loading
Last updated at 2:31 pm UTC on 16 April 2005
Tony Garnock-Jones March 02, 2005 Question: I'm curious about the way the user interface goes single-threaded when performing any kind of code-loading activity. It's frustrating sometimes to do e.g. an update-from-server, or to start a long package installation, and then to not be able to continue my work while the load is progressing.

I note that the system as a whole is still multiprocessing - for instance, I happened to have a Transcript open showing me that Cees's Tric stuff was still running while code was being loaded - so I imagine it's mostly a UI implementation issue. What would it take to make these kinds of things behave more asynchronously? Has anyone done any work along these lines before?

Tim Rowledge Answer: Actually it's pretty much always single threaded; the appearance of multiple things going on is the morphic stepping cycle.

Yes,..[It's frustrating sometimes]> but. Imagine you're loading code and your work is to be editing code. What is going to happen if your loading and coding clash? What if the loading code needs to be done in some atomic manner (perhaps it affects how the text views you are typing in work)?

One could certainly make update loading occur in another thread (easily) but how would we make it safe? Can't think of a quick answer right now.

Tony Garnock-Jones There's been some neat stuff done recently on transactional memory - see http://research.microsoft.com/Users/simonpj/papers/stm/ for details. I'm looking forward to the day such a system is available in my favourite programming environment.