Don't access UI resources from any thread other than the main thread.

So in your case don't call methods of the table view or the model from the secondary thread.

Also access to "kill_thread" is neither mutex protected nor is it an atomic.

Cheers,
_