Documenting thread behaviour