a-synchone construction of an object

Discussion in 'C++' started by Anthony, Sep 23, 2003.

  1. Anthony

    Anthony Guest

    Hi,
    Can anyone help me out here,

    I'm looking for a design (pattern?) for a-synchronic construction of a
    class.
    I need this design in a framework which will run in a multithreaded system.
    I want a class (client) in threadA to a-synchronously construct a class
    (server) in threadB.
    Both threads will probably need a kind of construction manager object.
    For passing the request I will probably need to use a parameterised class.
    The client class running in threadA sends a request, and the construction
    manager running in threadB, will handle the request.

    Does this problem sounds familiar to anyone? Is there a standard solution to
    this problem?

    Thanks in advance,
    Anthony Lansbergen
    Adesys b.v.
     
    Anthony, Sep 23, 2003
    #1
    1. Advertising

  2. "Anthony" <-is-A.A-is-E.nl> wrote...
    > I'm looking for a design (pattern?) for a-synchronic construction of a
    > class.


    Look at "factory method".

    > I need this design in a framework which will run in a multithreaded

    system.
    > I want a class (client) in threadA to a-synchronously construct a class
    > (server) in threadB.


    Doesn't sound right. You want the threadB to construct an object to
    be used in the threadA, upon a request from threadA. Nothing asynch
    in that, AFAICS.

    > Both threads will probably need a kind of construction manager object.


    More like a request manager.

    > For passing the request I will probably need to use a parameterised class.


    You just need a custom request.

    > The client class running in threadA sends a request, and the construction
    > manager running in threadB, will handle the request.


    Yep.

    > Does this problem sounds familiar to anyone? Is there a standard solution

    to
    > this problem?


    No. There are no threads in the standard. But you're on the right
    track. ThreadA sends a request, threadB handles it. Once the object
    has been created, threadB notifies threadA about the location of it.
    After than threadA can use the object.

    Not a C++ language problem, by the way.

    Victor
     
    Victor Bazarov, Sep 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerivix Entadi
    Replies:
    4
    Views:
    384
    John Harrison
    Feb 23, 2004
  2. newbiecpp

    Object construction

    newbiecpp, Jul 22, 2004, in forum: C++
    Replies:
    2
    Views:
    442
    SaltPeter
    Jul 22, 2004
  3. Dave
    Replies:
    7
    Views:
    391
    Default User
    Jan 11, 2005
  4. Ook
    Replies:
    10
    Views:
    566
  5. cantide5ga
    Replies:
    7
    Views:
    395
    cantide5ga
    Oct 23, 2007
Loading...

Share This Page