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
806febd8
Commit
806febd8
authored
Jun 20, 2005
by
Michael W. Hudson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some silly whitespace stuff (must have hit M-q or something?)
parent
452ead32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
Doc/api/init.tex
Doc/api/init.tex
+13
-13
No files found.
Doc/api/init.tex
View file @
806febd8
...
@@ -471,10 +471,10 @@ thread is now:
...
@@ -471,10 +471,10 @@ thread is now:
PyGILState
_
Release(gstate);
PyGILState
_
Release(gstate);
\end{verbatim}
\end{verbatim}
Note that the
\cfunction
{
PyGILState
_
*()
}
functions assume there is
only
Note that the
\cfunction
{
PyGILState
_
*()
}
functions assume there is
on
e global
interpreter (created automatically by
on
ly one global
interpreter (created automatically by
\cfunction
{
Py
_
Initialize()
}
). Python still supports the creation of
\cfunction
{
Py
_
Initialize()
}
). Python still supports the creation of
additional interpreters
(using
\cfunction
{
Py
_
NewInterpreter()
}
), but
additional interpreters (using
\cfunction
{
Py
_
NewInterpreter()
}
), but
mixing multiple interpreters and the
\cfunction
{
PyGILState
_
*()
}
API is
mixing multiple interpreters and the
\cfunction
{
PyGILState
_
*()
}
API is
unsupported.
unsupported.
...
@@ -697,16 +697,16 @@ interpreter lock has been created.
...
@@ -697,16 +697,16 @@ interpreter lock has been created.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyGILState
_
STATE
}{
PyGILState
_
Ensure
}{}
\begin{cfuncdesc}
{
PyGILState
_
STATE
}{
PyGILState
_
Ensure
}{}
Ensure that the current thread is ready to call the Python
Ensure that the current thread is ready to call the Python
C API
C API regardless of the current state of Python, or of its
regardless of the current state of Python, or of its thread lock.
thread lock. This may be called as many times as desired
This may be called as many times as desired by a thread as long as
by a thread as long as each call is matched with a call to
each call is matched with a call to
\cfunction
{
PyGILState
_
Release()
}
.
\cfunction
{
PyGILState
_
Release()
}
.
In general, other thread-related APIs may be used between
In general, other thread-related APIs may
\cfunction
{
PyGILState
_
Ensure()
}
and
\cfunction
{
PyGILState
_
Release()
}
be used between
\cfunction
{
PyGILState
_
Ensure()
}
and
\cfunction
{
PyGILState
_
Release()
}
calls as long as the
calls as long as the thread state is restored to its previous state
thread state is restored to its previous state before the Release().
before the Release(). For example, normal usage of the
For example, normal usage of the
\csimplemacro
{
Py
_
BEGIN
_
ALLOW
_
THREADS
}
\csimplemacro
{
Py
_
BEGIN
_
ALLOW
_
THREADS
}
and
and
\csimplemacro
{
Py
_
END
_
ALLOW
_
THREADS
}
macros is acceptable.
\csimplemacro
{
Py
_
END
_
ALLOW
_
THREADS
}
macros is acceptable.
The return value is an opaque "handle" to the thread state when
The return value is an opaque "handle" to the thread state when
\cfunction
{
PyGILState
_
Acquire()
}
was called, and must be passed to
\cfunction
{
PyGILState
_
Acquire()
}
was called, and must be passed to
...
...
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