is there a way to install a callbacks to be executed.on thread begin and thread end?
Simple place to initialize vars is in the thread's constructor. You can finalize in destructor too if want.
Quote from: User137 on June 20, 2016, 12:10:54 amSimple place to initialize vars is in the thread's constructor. You can finalize in destructor too if want.The thread's constructor is called in the calling thread (mostly main thread) and not in the new thread's thread. That could be a problem sometimes.
ok so, there is no way to execute a procedure in the begining of every thread... no matters if it use oop tthread or procedural way ... if some lib is starting a newthread there is no way to perepare variables for it?
and this is how FP Compiler makes it EASY
And very slow(bero said)
ok i know that oop way ... but if a thread is started with beginthread() the tls will be not initialized properly