]> gitweb.factorcode.org Git - factor.git/commitdiff
vocabs.loader: stop add-vocab-root spawning extra monitoring threads
authorAlexander Iljin <ajsoft@yandex.ru>
Wed, 14 Dec 2016 13:40:49 +0000 (16:40 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 21 Dec 2016 23:17:15 +0000 (15:17 -0800)
This fixes issue #1758.

core/vocabs/loader/loader.factor

index a92ebdd87fc6eb0cf2b26a5f22b8e2001607eaac..f77c32d57e4d8034b2b166d3144d3d2d6db3a210 100644 (file)
@@ -21,9 +21,8 @@ SYMBOL: add-vocab-root-hook
 ] "vocabs.loader" add-startup-hook
 
 : add-vocab-root ( root -- )
-    trim-tail-separators
-    [ vocab-roots get adjoin ]
-    [ add-vocab-root-hook get-global call( root -- ) ] bi ;
+    trim-tail-separators dup vocab-roots get ?adjoin
+    [ add-vocab-root-hook get-global call( root -- ) ] [ drop ] if ;
 
 SYMBOL: root-cache
 root-cache [ H{ } clone ] initialize