I expect that the module runs in the same thread as the
calling page. After all, modules and custom tags are designed such
that, if they set a variable caller.x, then the variable x will at
once be available to the calling page. If there were two threads
involved, one would have needed to lock or synchronize somewhere.