They are lined with epithelial cells. They are also surrounded by a network of capillaries. These capillaries are one cell thick and have very thin walls. This provides a short diffusion pathway. The walls being thin cause red blood cells to flatten against the thin walls when they pass through, so it slows the passing of red blood cells to allow for more time for gas exchange.