Re: require advice in this design issue specific to c++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • news.chris.theis@gmail.com

    Re: require advice in this design issue specific to c++

    On Oct 17, 11:34 am, abir <abirba...@gmai l.comwrote:
    [SNIP]
    Thanks for answering. I really don't need a multi threaded env in a
    sense that
    no mutex or locking is needed.  However there can be many users & so
    per user(per thread)
    context can be there.  Though at present i am forking a new process
    for each user, rather than creating a new thread. But as i have no
    global at present, i can do the other option equally well.
    I "think" for both option 1) & option 3) a per thread context has no
    problem.
    I am fearing that, and really trying to avoid global variables mostly
    because i am not sure of performance of global in inner loop (also
    some platform doesn't support global Symbian? )
    I'm not sure up to which point a global variable might become a
    runtime bottleneck. That would have to be checked for your case &
    compiler. However, I'd stay away from global variables as much as
    possible and go with singletons as you have much better control.

    As you say that you will not tread into the depths of mutexes & locks,
    I would say that your first option should do the trick just fine.

    Cheers
    Chris

Working...