threads: buffer sharing