Green’s Dictionary of Slang

knitting needle n.

the penis; thus knit, to masturbate.

[UK]Rowlands Humours Ordinarie G2: Tush, Cloth-breech doth deride him with a laugh, And lets him see Bone-paster; thats his staffe: Then tells him brother, friend, or so forth, heare ye T’is not your knitting-needle makes me feare ye.
[US]B. Rodgers Queens’ Vernacular 49: the penis [...] knitting needle (early ’60s). [Ibid.] 115: to masturbate [...] knit (camp, mid ’60s: ‘He’d rather stay home and tend to his knitting’).
[US]L. Kramer Faggots 320: Hot dog, joy stick, kidney wiper, knitting needle.
[SA]K. Cage Gayle 97/1: swap knitting patterns v. have sex [Durban].