Example #1
0
// signals the thread in question to terminate
func (t Thread) Kill() {
	C.pthread_kill(t.c(), C.SIGSEGV)
}
Example #2
0
// determines if the thread is running
func (t Thread) Running() bool {
	// magic number "3". oops
	// couldn't figure out the proper way to do this. probably because i suck
	// if someone knows the right way, pls submit a pull request
	return int(C.pthread_kill(t.c(), 0)) != 3
}