split piece into blocks and combine when all data is received
make threads daemons so that they quit when the main thread quits