Hey guys (and girls). I've got a threaded program where several threads (hehe, probably around a 100 or so) need to append a line to the same file. Just wondering if someone could point me in the right direction regarding how to go about locking the file so threads do not append to it simultaneously and overwrite each others output. Thanks for your help!