Is it "safe" or "legal" to use define in multiple threads?
I am currently looking at an infinite loop in guile, it looks like there's a pair with cdr pointing to itself. The pair is a hashtable bucket. I'm reading through hashtab.c and see no locking at all, and so it seems probable that this circular bucket list was created in a race between two threads inserting into the same hash table. Now, the test case which triggers this does nothing other than defines -- it loads a set of files, one per thread, and, for good measure, I reloaded these over and over. So typically, one will have the same function being redefined over and over, typically in different threads. The same function might be getting defined "simultaneously" in different threads, even. So-- I was assuming that this would be an inherently "safe" operation ... but maybe its not? Is there some funky semantics to define in a multi-threaded environment? --linas
