The Pali Cannon, written in Sri Lanka in between 600 BC and one hundred BC, states that sexual relations, no matter if of homosexual or of heterosexual character, is forbidden within the monastic code, and states that any acts of soft homosexual sex (which include masturbation and interfumeral sexual intercourse) isn't going to entail a punishment