#1 2016-09-09 15:25:28

emk
Member
Registered: 2013-10-24
Posts: 96

Critical section vs Slim Reader/Writer lock

https://www.delphitools.info/2013/12/18 … ocks-rock/
http://nasutechtips.blogspot.ro/2010/11 … locks.html

Seems that SWR exclusive lock is twice as fast as CriticalSection. Why not use it in mORMot "if Windows >= Vista"? since the more threads are involved, the bigger gains.

Offline

#2 2016-09-09 17:41:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,667
Website

Re: Critical section vs Slim Reader/Writer lock

Because SRW are not re-entrant, and in practice the gain is not worth it since our TSynLock granularity is usually either with no lock, or with some milliseconds time.

Offline

Board footer

Powered by FluxBB