[hunchentoot-devel] Hunchentoot Thread Safety
Mostafa Razavi
hom.sepanta at gmail.com
Mon Feb 4 20:44:55 UTC 2008
Oh! So basically definitions are global, bindings thread-local. That
makes sense. Thanks, Zach.
Hom
Zach Beane wrote:
> On Mon, Feb 04, 2008 at 11:44:48PM +0330, Mostafa Razavi wrote:
>
>> Hi. I've been thinking about Hunchentoot's thread safety, lately. I see
>> that for each request Hunchentoot spawns a new thread (if possible, of
>> course) and binds the special variable *request* for it. Initially I
>> thought this could cause problems, but when I did a few tests I found
>> out everything actually seems to work correctly.
>>
>> Now, I'm not complaining why things are not going wrong, only I'm
>> curious how is it that using a dynamic variable, which is one of those
>> dreaded global variables after all, does not cause problems here.
>>
>
> Special variables are global variables done right, and aren't to be
> dreaded in Common Lisp.
>
> In threaded Lisps, binding a special will typically make it
> thread-local. For example, in SBCL:
>
> http://www.sbcl.org/manual/Special-Variables.html
>
> Zach
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
>
More information about the Tbnl-devel
mailing list