[omniORB] RE: Threads and MFC
von Tabouillot
vontab@mail.tele.dk
Thu, 16 Aug 2001 19:58:42 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0012_01C1268D.D94F4660
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello Duncan,
My component is called from the MFC application and when the net
library is accessed, a context switch occurs. If omniORB can't use
separate threads for local invocations, I need to make a thread pool and
re-call all incoming calls on different threads ( with wait and events
synchronization ). If I create threads using _beginthread() ( or
CreateThread() ), I get at free thread. The calling thread in the MFC
application is synchronized through a hidden window with alot of hooks
and garbage to make MFC work.
Cheers,
Daniel.
-----Original Message-----
From: [mailto:dpg1@uk.research.att.com]On
Behalf Of Duncan Grisby
Sent: Wednesday, August 15, 2001 16:26
To: von Tabouillot
Cc:=20
Subject: Re: [omniORB] Threads and MFC=20
On Monday 13 August, "von Tabouillot" wrote:
[ please don't send html mail to the omniORB mailing list ]
> I have an CORBA object, implemented in an DLL, that is called from
> an MFC application. MFC does thread sync. through a hidden window and
is
> therefore inherently slow in context switches. When my object is
invoked
> from a normal console application it performs 5-10 times faster. Is
> there any way to force omniORB ( v.3.0.4 ) to use a separate thread
for
> local invocations, as it does if called from an external program ?
I don't know anything about MFC, so perhaps I misunderstand your
problem. Can you just create your own thread and do your local
invocations from that? What exactly is it that is slow?
Cheers,
Duncan.
--=20
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --
------=_NextPart_000_0012_01C1268D.D94F4660
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Duncan,<BR><BR>My component is =
called from=20
the MFC application and when the net<BR>library is accessed, a context =
switch=20
occurs. If omniORB can't use<BR>separate threads for local invocations, =
I need=20
to make a thread pool and<BR>re-call all incoming calls on different =
threads (=20
with wait and events<BR>synchronization ). If I create threads using=20
_beginthread() ( or<BR>CreateThread() ), I get at free thread. The =
calling=20
thread in the MFC<BR>application is synchronized through a hidden window =
with=20
alot of hooks<BR>and garbage to make MFC=20
work.<BR><BR>Cheers,<BR><BR>Daniel.<BR><BR>-----Original=20
Message-----<BR>From: [<A=20
href=3D"mailto:dpg1@uk.research.att.com">mailto:dpg1@uk.research.att.com<=
/A>]On<BR>Behalf=20
Of Duncan Grisby<BR>Sent: Wednesday, August 15, 2001 16:26<BR>To: von=20
Tabouillot<BR>Cc: <BR>Subject: Re: [omniORB] Threads and MFC =
<BR><BR><BR>On=20
Monday 13 August, "von Tabouillot" wrote:<BR><BR>[ please don't send =
html mail=20
to the omniORB mailing list ]<BR><BR>> I have =
an=20
CORBA object, implemented in an DLL, that is called from<BR>> an MFC=20
application. MFC does thread sync. through a hidden window =
and<BR>is<BR>>=20
therefore inherently slow in context switches. When my object=20
is<BR>invoked<BR>> from a normal console application it performs 5-10 =
times=20
faster. Is<BR>> there any way to force omniORB ( v.3.0.4 ) to use a =
separate=20
thread<BR>for<BR>> local invocations, as it does if called from an =
external=20
program ?<BR><BR>I don't know anything about MFC, so perhaps I =
misunderstand=20
your<BR>problem. Can you just create your own thread and do your=20
local<BR>invocations from that? What exactly is it that is=20
slow?<BR><BR>Cheers,<BR><BR>Duncan.<BR><BR>-- <BR> -- Duncan =
Grisby =20
\ Research Engineer --<BR> -- AT&T Laboratories=20
Cambridge =20
--<BR> -- <A=20
href=3D"http://www.uk.research.att.com/~dpg1">http://www.uk.research.att.=
com/~dpg1</A>=20
--</FONT></DIV></BODY></HTML>
------=_NextPart_000_0012_01C1268D.D94F4660--