druntime thread_needLock()

Christopher Wright dhasenan at gmail.com
Sat Dec 6 06:06:11 PST 2008


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.



More information about the Digitalmars-d mailing list