Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
dc32d18d
Commit
dc32d18d
authored
Mar 19, 2013
by
Kristján Valur Jónsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #15038 : Fixing the condition broadcast and docs.
parent
f47e77f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Python/condvar.h
Python/condvar.h
+6
-6
No files found.
Python/condvar.h
View file @
dc32d18d
...
...
@@ -163,10 +163,9 @@ PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, long us)
Generic emulations of the pthread_cond_* API using
earlier Win32 functions can be found on the Web.
The following read can be edificating (or not):
The following read can be give background information to these issues,
but the implementations are all broken in some way.
http://www.cse.wustl.edu/~schmidt/win32-cv-1.html
See also
*/
typedef
CRITICAL_SECTION
PyMUTEX_T
;
...
...
@@ -297,9 +296,10 @@ PyCOND_SIGNAL(PyCOND_T *cv)
Py_LOCAL_INLINE
(
int
)
PyCOND_BROADCAST
(
PyCOND_T
*
cv
)
{
if
(
cv
->
waiting
>
0
)
{
return
ReleaseSemaphore
(
cv
->
sem
,
cv
->
waiting
,
NULL
)
?
0
:
-
1
;
cv
->
waiting
=
0
;
int
waiting
=
cv
->
waiting
;
if
(
waiting
>
0
)
{
cv
->
waiting
=
0
;
return
ReleaseSemaphore
(
cv
->
sem
,
waiting
,
NULL
)
?
0
:
-
1
;
}
return
0
;
}
...
...
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