Most basic nothrow, pure, @safe functions?

Walter Bright newshound2 at digitalmars.com
Thu Mar 20 14:32:01 PDT 2014


On 3/18/2014 5:49 PM, Walter Bright wrote:
> On 3/18/2014 4:56 PM, Steven Schveighoffer wrote:
>> Can we mark _d_monitorenter and _d_monitorexit nothrow and have the compiler see
>> that when using synchronized? This was the hurdle we couldn't overcome in the
>> referenced pull request.
>>
>> Should those be marked nothrow? What about pure and @safe?
>
> Good question. I don't have an answer at the moment.
>

I'm pretty sure they can't be pure. After all, monitors affect global state, can 
result in deadlocks, etc.


More information about the Digitalmars-d mailing list