OTOH, it's looks about the same as in Java and even Java now has explicit Locks, because "synchronized" simply isn't efficient
I suppose if using Futex (in Linux) or an implementation of a user space Mutex in the RTL (using a bus locked read-modify write instruction and do a system call only when the resource is taken by another thread) needs close to no CPU time.

-Michael
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to