is core Mutex lock "fast"?

Steven Schveighoffer schveiguy at gmail.com
Tue Jan 26 20:13:10 UTC 2021


On 1/26/21 1:07 PM, ludo wrote:
> Hi guys,
> 
> still working on old D1 code, to be updated to D2. At some point the 
> previous dev wrote a FastLock class. The top comment is from the dev 
> himself, not me. My question is after the code.
> 

[snip]

> Is it so that the 
> old Tango's mutex lock was not keeping count and would lock the same 
> object several time? Do we agree that the FastLock class is obsolete 
> considering current D core?

Just want to point out that druntime was based off of Tango's runtime. 
So I would expect D2's mutex to have at least as much performance as 
Tango's mutex.

If this is D1 code, it was before this happened (D1 phobos did not share 
a runtime with Tango).

-Steve


More information about the Digitalmars-d-learn mailing list