multithreading and member-functions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Attila Feher

    #16
    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


    Comment

    • Attila Feher

      #17
      Re: multithreading and member-functions

      Attila Feher wrote:[color=blue]
      > Reinterpret case is[/color]

      Of course I meant reinterpret cast

      --
      Attila aka WW


      Comment

      Working...