oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

SRWLock implementation still disabled ?

Open Carandiru0 opened this issue 6 years ago • 3 comments

Looks like siince 2012: https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/327962

SRWLocks are not being used on Windows. In windows_api.h at the end of the file:

#if defined(RTL_SRWLOCK_INIT) #ifndef __TBB_USE_SRWLOCK // TODO: turn it on when bug 1952 will be fixed #define __TBB_USE_SRWLOCK 0 #endif #endif

Looks like this one was missed!

I'm guessing that this was not intentional for this long period of time.

Carandiru0 avatar Oct 10 '19 23:10 Carandiru0

It seems that oneTBB still do not use SRWLOCK by default

anton-potapov avatar Oct 05 '21 21:10 anton-potapov

@anton-potapov is this issue still relevant?

arunparkugan avatar Aug 13 '24 11:08 arunparkugan

@arunparkugan , I believe it is a question to issue creator - @Carandiru0 :)

anton-potapov avatar Nov 01 '24 10:11 anton-potapov

Yes, this is still relevant because SRW locks are best for performance on Windows. In the CRT, std::mutex itself uses SRW locks underneath.

e4lam avatar Jun 20 '25 16:06 e4lam

Not considered. Should effectively be portable.

Carandiru0 avatar Aug 14 '25 20:08 Carandiru0

@Carandiru0 Not following. The gist of this issue is that we're leaving performance on the floor that's easy to have.

e4lam avatar Aug 15 '25 04:08 e4lam