Open GoogleCodeExporter opened 9 years ago
sorry, I meant this as "Enhancement" and low priority.
Original comment by Pabl...@gmail.com
on 17 Aug 2009 at 10:26
Yeah, create a new CCallable class just like the ones in ghostdb.h. Allocate
it, pass
any data you want the thread to have access to into the object, then copy the
CreateThread function from CGHostDBMySQL and run it on your callable. Store the
callable in a data structure such as a vector somewhere, check it occasionally
to see
if it's ready, and when it is, delete the callable and free any resources you
gave it.
Be very careful about not touching the callable before it's ready, and in your
thread
be very careful about not touching any data you weren't explicitly given from
within
the callable. Also make sure you don't call any non thread safe functions, of
which
there are a lot.
I'll look into putting that replay code in a thread soon I think.
Original comment by hogantp
on 17 Aug 2009 at 3:14
Original issue reported on code.google.com by
Pabl...@gmail.com
on 17 Aug 2009 at 10:24