The blood–thymus barrier regulates exchange of substances between the circulatory system and thymus, providing a sequestered environment for immature T cells to develop. The barrier also prevents the immature T cells from contacting foreign antigens (since contact with antigens at this stage will cause the T cells to die by apoptosis).
The barrier is formed by the continuous blood capillaries in the thymic cortex, reinforced by epithelial reticular cells and macrophages.
References
Blood–thymus barrier Wikipedia(Text) CC BY-SA