druntime thread_needLock()

Robert Fraser fraserofthenight at gmail.com
Sat Dec 6 21:34:20 PST 2008


Leandro Lucarella wrote:
> Christopher Wright, el  6 de diciembre a las 09:06 me escribiste:
>> Fawzi Mohamed wrote:
>>> So yes one could probably switch back to the old Phobos style.
>>> I would guess that it is not really a common situation for a program to become single threaded again, though...
>>> Fawzi
>> At work, we have a single-threaded application -- everything happens on the GUI thread. There are some operations that take a long time, though. For those, we 
>> throw up a spinny dialog box. But if these operations happened on the GUI thread, the spinny dialog box would not spin. So we do the expensive operations on a 
>> background thread.
>>
>> So, our application becomes multithreaded on rare occasions and becomes single-threaded again after.
>>
>> Not sure how common this is.
> 
> I think this is pretty common in GUI applications, but I don't think GUI
> applications usually are performance critical, right?
> 

Maya? Combustion? Final Cut Pro? Photoshop? Visual Studio (it shouldn't 
be, but it can get damn slow on occasion)?

Heck, most GUI programs seem like they "could be faster". Opening 
Outlook takes 30 seconds. Firefox takes 5-10 seconds to start. Even 
Windows Explorer feels sluggish (to its credit, much less so than Gnome 
or KDE). I'm not sure if this translates to "performance-critical", but 
it's certainly something to think about.



More information about the Digitalmars-d mailing list