Hello List

I am working on an application where I would normally be using
multithreading. But sometimes, depending on how much data sharing is being
shared, I might want to invoke the same application in single-threaded mode.

Now when I invoke it in single-threaded mode, I would not like to have all
the overhead incurred due to mutex/monitor locking. Does DMD have some
compile time flags to achieve that.

One way I can think about achieving this is by enclosing all the
'synchronized' declarations inside small version blocks. But I am afraid
this would make the code quite unwieldy.
Is there a recommended way of achieving this end?

Regards
- Puneet

Reply via email to