Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
03e08e25
Commit
03e08e25
authored
Mar 24, 2018
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: put huge liability notice in fork() docs.
parent
19d17982
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
docs/api.rst
docs/api.rst
+24
-0
No files found.
docs/api.rst
View file @
03e08e25
...
...
@@ -525,6 +525,30 @@ Router Class
and router, and responds to function calls identically to children
created using other methods.
For long-lived processes, :py:meth:`local` is always better as it
guarantees a pristine interpreter state that inherited nothing from the
parent. Forking should only be used in performance-sensitive scenarios
where short-lived children are spawned, and only after accounting for
all the bad things possible as a result of, for example:
* file descriptors open in the parent remaining open in the child,
causing the lifetime of the underlying object to be extended
indefinitely by the child. For example:
* From the perspective of external components, this is observable
in the form of pipes and sockets that are apparently never closed
by the remote end (your program).
* Descriptors that reference large temporary files will not have
their disk space reclaimed until the child exits.
* third party package state (such as urllib3's HTTP connection pool)
attempting to write to file descriptors shared with the parent.
* memory mappings for large files that cannot have their space freed on
disk due to the mapping living on in the child.
* thread locks held in the parent producing random deadlocks in the
child.
The associated stream implementation is
:py:class:`mitogen.fork.Stream`.
...
...
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