[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change of socketport constructor
From: |
Dimitar Dimitrov |
Subject: |
Re: change of socketport constructor |
Date: |
Sun, 13 Apr 2003 14:06:23 +0200 |
User-agent: |
KMail/1.5 |
Hi,
What you mention is correct. The situation is even worse. The socketservice
thread can call the destructor of your socketport class before the
constructor of the object has finished. I tried to mention this some time
ago, but it seems nobody noticed. And it is not only Win32 issue, looks more
like design problem.
I'll be very interested in your patch.
Regards,
Dimitar
On Saturday 12 April 2003 15:21, triendl klaus wrote:
> hi,
>
> i derived my own class from socketport and tested the whole
> server-implemenentation with socketservice(s) and attached socketports
> thoroughly on windows (2000 and xp) and discovered severe problems with the
> teamwork of socketservice and my socketport during construction.
>
> the point is that the socketport constructor expects a valid socketservice
> to which it attaches itself after establishing the connection with the
> client. after attaching itself it causes the socketservice to update
> itself. then the construction of the derived class can continue. so far so
> good. now, the problem is that the socketservice runs in its own thread
> which is so quick that if there is already pending data on the socket it
> calls SocketPort::pending() BEFORE the virtual function pointers of the
> derived class and other variables are initialized.
>
>
> therefore i changed the code so far that the class derived from socketport
> has to attach itself now - after all variables have been initialized. if
> you agree i would send a patch.
>
>
> --
> klaus triendl
>
>
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp
- change of socketport constructor, triendl klaus, 2003/04/12
- Re: change of socketport constructor,
Dimitar Dimitrov <=
- Re: change of socketport constructor, klaus triendl, 2003/04/14
- Re: change of socketport constructor, Dimitar Dimitrov, 2003/04/15
- RE: change of socketport constructor, klaus triendl, 2003/04/15
- RE: change of socketport constructor, klaus triendl, 2003/04/18
- Re: change of socketport constructor, Federico Montesino Pouzols, 2003/04/20
- Re: change of socketport constructor, David Sugar, 2003/04/20