[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Serious SocketService/SocketPort problems
From: |
Prochnow, Christian |
Subject: |
Serious SocketService/SocketPort problems |
Date: |
Thu, 21 Nov 2002 11:35:59 +0100 |
User-agent: |
KMail/1.4.3 |
Hi List,
here comes a really serious problem related to SocketService and SocketPort:
SocketPort() takes a SocketService argument, when SocketPort is created, it
attaches itself to the given SocketService. Which seems to lead to
synchronisation problems.
I have a class (say MySocketPort) that is inherited from SocketPort (with
outbound constructor). So when i create the MySocketPort object in the
main-thread the SocketPort() base constructor registers itself with the
SocketService which is then started by SocketService::attach().
So when the SocketService-thread begins to run and immediatly tries to
dispatch a virtual call to MySocketPort - it will be dispatched to the
default implementation (SocketPort::connect()) cause the vtable of
MySocketPort is'nt fully setup.
This seems to be timing-related, cause under Linux this works fine - under
Windows XP it crashes (i think new started threads in XP are immediatly
executed and the creator-thread gets yield).
I have no idea how to solve this. Only solution would be that SocketPort()
does not attach itself when constructing ... instead MySocketPort should
attach itself to the SocketService.
Thanks in advance,
Christian
--
Christian Prochnow
Berliner Freiverkehr (Aktien) AG - Kurfürstendamm 117 - 10711 Berlin, Germany
Fon: +49-30-89606409, Fax: +49-30-89021389 - EMail: address@hidden
- Serious SocketService/SocketPort problems,
Prochnow, Christian <=