Re: multithreading and member-functions
Ron Samuel Klatchko wrote:[color=blue]
> So, what you want is a function that is compatible with begin thread
> and will forward your function correctly.[/color]
And if you want that (forward correctly) you do nto want to use the posted
code.
[color=blue]
> extern "C" void _cdecl forward_functio n(void *arg)
> {
> A *a = reinterpret_cas t<A *>(arg);[/color]
Reinterpret case is _implementation _ defined. In *all* cases. If you want
to get back your original A pointer here you *must* use static_cast (or a C
style cast).
--
Attila aka WW
Ron Samuel Klatchko wrote:[color=blue]
> So, what you want is a function that is compatible with begin thread
> and will forward your function correctly.[/color]
And if you want that (forward correctly) you do nto want to use the posted
code.
[color=blue]
> extern "C" void _cdecl forward_functio n(void *arg)
> {
> A *a = reinterpret_cas t<A *>(arg);[/color]
Reinterpret case is _implementation _ defined. In *all* cases. If you want
to get back your original A pointer here you *must* use static_cast (or a C
style cast).
--
Attila aka WW
Comment