From: Giovanni G. <gi...@ci...> - 2009-10-26 18:32:51
|
Bhaskara Marthi wrote: > In other words, is it safe to have multiple threads reading a special > variable and/or using setq to change it, without any locking? Seconded... I add that it would be very useful to have this answer included in the threads section of the sbcl manual; and not just for plain variables, but also for other things (arrays, hash tables, objects, structs...). The manual currently is very vague ("Large amounts of the SBCL library have not been inspected for thread-safety"); one can surely put locks around everything, just to be safe, but it would be nice to know when this is necessary and when it is not. I remember seeing this kind of information sometimes appearing in the CHANGES in the past, but it is difficult to find it. |