1.0.7.14: thread-safe INTERN, EXPORT, &co
commita556288505e2687ac333e1b0a8deebb13c76a60c
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 12 Jul 2007 17:28:40 +0000 (12 17:28 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 12 Jul 2007 17:28:40 +0000 (12 17:28 +0000)
treeabea232829ba518ec5ad570458408798c1cc5c05
parenta40acb7f6d4b6beb4251c77bc00f73967dcddc77
1.0.7.14: thread-safe INTERN, EXPORT, &co

 * Modifications to packages grab a global lock. INTERN is the only
   real potential performance bottleneck here, but as long as the
   symbol already exists it doesn't need to get the lock.

   We need a global lock instead of a per-package lock because eg.
   (EXPORT 'FOO::BAR :FOO) and (INTERN "BAR" :ZOT) can conflict, even
   though they operate on different packages.

   Since races should be rare we use a spinlock to avoid making a
   system call for every release.

   Interrupt safety? Probably no. It's likely that you can wedge the
   package system into a bad state if you really try.
src/pcl/compiler-support.lisp
src/pcl/slots-boot.lisp
src/pcl/slots.lisp
version.lisp-expr