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
a3f03e1c
Commit
a3f03e1c
authored
Nov 13, 2002
by
Huw Davies
Committed by
Alexandre Julliard
Nov 13, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a counter to keep track of the number of outstanding async
requests. This gets around a problem where a SetEvent could be called before a previous event had been dealt with.
parent
8d74ef10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
internet.c
dlls/wininet/internet.c
+9
-0
No files found.
dlls/wininet/internet.c
View file @
a3f03e1c
...
...
@@ -89,6 +89,7 @@ VOID INTERNET_ExecuteWork();
DWORD
g_dwTlsErrIndex
=
TLS_OUT_OF_INDEXES
;
DWORD
dwNumThreads
;
DWORD
dwNumIdleThreads
;
DWORD
dwNumJobs
;
HANDLE
hEventArray
[
2
];
#define hQuitEvent hEventArray[0]
#define hWorkEvent hEventArray[1]
...
...
@@ -127,6 +128,7 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
dwNumThreads
=
0
;
dwNumIdleThreads
=
0
;
dwNumJobs
=
0
;
case
DLL_THREAD_ATTACH
:
{
...
...
@@ -1674,6 +1676,10 @@ DWORD INTERNET_WorkerThreadFunc(LPVOID *lpvParam)
while
(
1
)
{
if
(
dwNumJobs
>
0
)
{
INTERNET_ExecuteWork
();
continue
;
}
dwWaitRes
=
WaitForMultipleObjects
(
2
,
hEventArray
,
FALSE
,
MAX_IDLE_WORKER
);
if
(
dwWaitRes
==
WAIT_OBJECT_0
+
1
)
...
...
@@ -1724,6 +1730,7 @@ BOOL INTERNET_InsertWorkRequest(LPWORKREQUEST lpWorkRequest)
LeaveCriticalSection
(
&
csQueue
);
bSuccess
=
TRUE
;
InterlockedIncrement
(
&
dwNumJobs
);
}
return
bSuccess
;
...
...
@@ -1762,6 +1769,7 @@ BOOL INTERNET_GetWorkRequest(LPWORKREQUEST lpWorkRequest)
memcpy
(
lpWorkRequest
,
lpRequest
,
sizeof
(
WORKREQUEST
));
HeapFree
(
GetProcessHeap
(),
0
,
lpRequest
);
bSuccess
=
TRUE
;
InterlockedDecrement
(
&
dwNumJobs
);
}
return
bSuccess
;
...
...
@@ -1824,6 +1832,7 @@ VOID INTERNET_ExecuteWork()
if
(
INTERNET_GetWorkRequest
(
&
workRequest
))
{
TRACE
(
"Got work %d
\n
"
,
workRequest
.
asyncall
);
switch
(
workRequest
.
asyncall
)
{
case
FTPPUTFILEA
:
...
...
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