Is synchronized(...){...} doomed to never be nothrow/@nogc?

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed May 11 01:08:56 PDT 2016


On 2016-05-11 09:22, ZombineDev wrote:

> These cases all look like they want to use tryLock instead
> (http://dlang.org/phobos/core_sync_mutex#.Mutex.tryLock).

Ah, thanks. Although I see now that the code is not using Monitor.lock, 
it uses Condition.wait. Condition in this case is not the one in 
druntime, so I might be good.

BTW, shouldn't there be a tryWait as well?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list