Sharing a variable in multithreading

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tsai
    New Member
    • Mar 2008
    • 1

    Sharing a variable in multithreading

    Hi everyone,

    In my c++ code i need to access a variable from the main() ,which is populated in another pthread.What could be the better approach?I tried using shared memory but getting some issues with lock.

    Getting errors of sort

    "Pure virtual method called"

    "unable to unlock the buffer"

    "kernel errors"

    Hope i gave enough info.

    Thanks in advance.


    Regards
    tsai
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    I can't tell what's going on here. You will need to provide mopre information.

    Comment

    Working...