A tokenspace repository stores documents as a sequence of tokens. A first
version of a document is stored in the repository, within an accessible
range of the repository. When a second version of the document is
received, the second version is also stored in the repository and the
accessible range of the repository is modified to include both the first
version and the second version of the document. Then the first version of
the document is invalidated. Queries are executed against the repository
in a plurality of threads without interruption during the operations of
receiving the second version of the document, storing the second version
of the document in the repository, modifying the accessible range of the
repository, and invalidating the first version of the document.