This happened during my freshman year in the high school
We had the swimming pool in the school and me and one of my classmates took the special classes where often we were the only two boys. There were separate dressing rooms for boys and for girls and also separate showers, but for some reasons the girls needed to pass through boys´ simple open showers when entering or leaving the pool. The teacher usually let girls exit the pool first and then two of us went to the shower, but this didn´t avoid the next girls´ group to go around us while we were showering.
We always stood there fully naked and took quite long showers, much longer than breaks between classes and were always seen by the girls who walked there trying not to look at us. It was not only seeing them in the swimming suits but the whole situation was wery arousing and both of us always got the erections. Maybe the first two times I went immediately to the toilet and masturbated there quickly, but both times my friend just found out and asked me whether I was jerking off there. So I found it useless and the next time I simply turned a half away from his sight and started to do it right there and then. After about ten strokes I strongly ejaculated, because this was really very exciting for me. I felt a little ashamed, but when I turned back I saw my friend doing exactly the same thing. It was not the first time I saw somebody masturbating, but it was the first time I participated, even not directly.
We built some kind of habit on jerking off together in the shower or sometimes, when we supposed some people to appear we finished in the locker room. It lasted the whole school year and a half of the next one, twice each week. After that some other classmates joined us for swimming and it was no longer possible, so we stopped doing it there. Sometimes we visited in each others house or so, but it didn´t have that meaning to masturbate together there since we are not gays and had the other things to do or discuss.