in reply to xs, threads and panic

Ok. Last solution works, but it is not very useful for me. Because, I call callbacks from Perl in my examples. I need pass callbacks to shared library and before creation of threads.

Is it possible?