FORWARD BIAS OF A P-N JUNCTION
As the electrons move towards the positive terminal and the holes towards the negative, they will come to the depletion layer. This is a very narrow layer around the junction (i.e. around the interface of the two semiconductors.) In the depletion layer, electrons and holes can recombine, but the recombination rate is not high enough so as not to allow electrons to reach the positive terminal. This recombination effect takes place in the diodes of solar photovoltaic cells as well, and it is an interesting field of research in how to reduce its effectiveness. The recombination rate is smaller for larger energy gaps. By the way, these recombination processes are what generate the emitted light in LEDs, where the energy gap of the diode is arranged to be visible light of a desired colour.