On Linux and OSX, POSIX mutexes act as critical sections, but on Windows they have additional kernel overhead as they can be shared between processes.
It would be nice if PureBasic could add support for the "critical section" idiom to wrap Win32 functionality and default back to mutexes on other OSs. I am currently using a #CompilerIf but it would be nice if this were abstracted away for me.
[Implemented] Add support for Win32 critical sections
Re: Add support for Win32 critical sections to Thread librar
What is called a "Mutex" in PB is actually implemented on Windows using the CriticalSection APIs. We don't use the Windows kernel object called "Mutex".
quidquid Latine dictum sit altum videtur
Re: Add support for Win32 critical sections to Thread librar
Thanks Freak.

How true!quidquid Latine dictum sit altum videtur

- It was too lonely at the top.
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Re: Add support for Win32 critical sections to Thread librar
Thanks for the tip. 
