On Wed, 27 Apr 2016 20:48:51 +0200, Sönke Ludwig wrote:
Looks good, although in this specific case you wouldn't really need to
use aTaskMutex
(it has some performance overhead). That is only
required if any blocking operations (I/O, receiving messages, sleeping,
yield'ing) take place while the mutex is locked. So if that's not the
case, using the object's own monitor is fine, too.
Is the overhead important ? Is reading/writing data from/to disk considered a blocking I/O operation ?
I have to protect modifying and rendering data stored in a cache which may occasionally require access to a local disk. Should this be protected by an interruptible mutex or is a std D mutex OK?