From: MenTaLguY Date: 2006-11-12T06:52:09+09:00 Subject: Re: fast mutexes for 1.8? --=-H8aB6zC6081IfGvUnz4q Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2006-11-08 at 17:07 +0900, Joel VanderWerf wrote: > I've been complaining about this for *years*. >=20 > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/61918 > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/219585 >=20 > A suggested fix (which has been stress tested as part of the fsdb=20 > project) is at: >=20 > http://www.rubygarden.org/ruby?ForkableMutex Hmm. Having looked into this, I'm not sure breaking the lock at fork is the right thing to do. The reason is that if fork "kills" a thread while it is holding a lock, you have no idea what state the data the lock protects is in. As far as I can tell, the only 100% reliable approach is to quiesce all threads which might potentially hold locks before forking. -mental --=-H8aB6zC6081IfGvUnz4q Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBFVkYDSuZBmZzm14ERAr9TAJ41qsd4J9UtGKWVUvHCOLPmwUlPzgCeJfXm 2KJkQyoWIqtRB/hEjLCoZpY= =hfht -----END PGP SIGNATURE----- --=-H8aB6zC6081IfGvUnz4q--