473,465 Members | 4,818 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

a-synchone construction of an object

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.

Jul 19 '05 #1
1 1545
"Anthony" <an*****@EdAsys.E-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

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jerivix Entadi | last post by:
I'm attempting to create an application to work with a fluid database of people. I'm doing this in a command line, text-based manner. I need to know two things: 1) How do I save data, perhaps a...
2
by: Steve | last post by:
Hi Folks, Sorry for this stupid question, but how do you handle errors during class construction. In other words, if I have a class that loads a file, and during loading, an error occurs, how do...
14
by: trying_to_learn | last post by:
i am on the chapter on copy construction in C++ in the code (see below), the author says if u pass the object by value as in HowMany h2 = f(h); ....then a bitwise object is created w/o calling...
7
by: Dave | last post by:
Hello all, In the code below, I use a pointer to an object under construction. Is the usage below legal? I have come across similar code at work. It compiles, but I'm not sure it's really...
15
by: Jakob Bieling | last post by:
Hi, I am aware of the fact, that the order of construction of global objects is unspecified. But I am in a situation, where I need to guarantee, that one object is created before others (not all...
29
by: pmatos | last post by:
Hi all, Sometimes I have a function which creates an object and returns it. Some are sets, other vectors but that's not very important. In these cases I do something like this: vector<int> *...
6
by: Luke | last post by:
Here is my emails to Danny Goodman (but probably he is very busy so he didn't answered it). First email(simple): Subject: JavaScript Arrays " We all know the array can act like HashMap, but is...
1
by: ChasW | last post by:
Im looking for some technical clarification regarding exactly what the differences, if any, are between the two pieces of code are, aside from the obvious syntactical differences. int x = 5; ...
4
by: craig | last post by:
During construction of an object "parent", if you create a subobject that stores a pointer to the parent (through the "this" pointer), will that pointer be valid when the subobject is later called?...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.