0

Some systems have pretty smart mutex locks that spin in-process for a bit before grabbing a lock from the OS. If your system has such a mutex there's not much point concerning yourself about writing an in-process mutex type.

But not all systems do.

Does ACE take care of this uncertainty for us? I couldn't find it stated in the docs...

Edward Strange
  • 40,307
  • 7
  • 73
  • 125
  • 1
    As far as I understand, ACE provides template wrappers of existing functionality (in this case, POSIX thread mutex). It will implement missing functionality so that cross platform development will succeed for applications using its framework. Whether you get the spin behavior or not will be system dependent. – jxh Aug 01 '14 at 14:27

1 Answers1

0

It depends upon the underlying platform and config.

For example ACE_Thread_Mutex uses a CRITICAL_SECTION on Win32: 5.7.7. Other unix versions can use a pthread_mutex. Look into what USYNC_THREAD goes to on your platform.

Paul Rubel
  • 26,632
  • 7
  • 60
  • 80