Usando threadlocals