Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
650ac142
Commit
650ac142
authored
Mar 18, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Mar 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole: Use the thread pool for executing RPC calls for better performance
(after the thread pool has been improved).
parent
c33fbc0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
rpc.c
dlls/ole32/rpc.c
+7
-8
No files found.
dlls/ole32/rpc.c
View file @
650ac142
...
...
@@ -220,12 +220,14 @@ static HRESULT WINAPI ServerRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
static
DWORD
WINAPI
rpc_sendreceive_thread
(
LPVOID
param
)
{
struct
dispatch_params
*
data
=
(
struct
dispatch_params
*
)
param
;
/* FIXME: trap and rethrow RPC exceptions in app thread */
data
->
status
=
I_RpcSendReceive
((
RPC_MESSAGE
*
)
data
->
msg
);
TRACE
(
"completed with status 0x%lx
\n
"
,
data
->
status
);
SetEvent
(
data
->
handle
);
return
0
;
}
...
...
@@ -249,7 +251,6 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
RPC_STATUS
status
;
DWORD
index
;
struct
dispatch_params
*
params
;
DWORD
tid
;
APARTMENT
*
apt
=
NULL
;
IPID
ipid
;
...
...
@@ -279,10 +280,9 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
RpcBindingInqObject
(
msg
->
Handle
,
&
ipid
);
hr
=
ipid_get_dispatch_params
(
&
ipid
,
&
apt
,
&
params
->
stub
,
&
params
->
chan
);
params
->
handle
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
if
((
hr
==
S_OK
)
&&
!
apt
->
multi_threaded
)
{
params
->
handle
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
TRACE
(
"Calling apartment thread 0x%08lx...
\n
"
,
apt
->
tid
);
if
(
!
PostMessageW
(
apartment_getwindow
(
apt
),
DM_EXECUTERPC
,
0
,
(
LPARAM
)
params
))
...
...
@@ -309,10 +309,9 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
* and re-enter this STA from an incoming server thread will
* deadlock. InstallShield is an example of that.
*/
params
->
handle
=
CreateThread
(
NULL
,
0
,
rpc_sendreceive_thread
,
params
,
0
,
&
tid
);
if
(
!
params
->
handle
)
if
(
!
QueueUserWorkItem
(
rpc_sendreceive_thread
,
params
,
WT_EXECUTEDEFAULT
))
{
ERR
(
"
Could not create RpcSendReceive thread,
error %lx
\n
"
,
GetLastError
());
ERR
(
"
QueueUserWorkItem failed with
error %lx
\n
"
,
GetLastError
());
hr
=
E_UNEXPECTED
;
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment