Previously we exitted without calling waitpid(), which meant the
top-level process struct rusage did not reflect the resource usage
consumed by the multiplexer processes.
Existing benchmarks are made using perf so this never created a problem,
but it could be confusing to others using the "time" command, and also
allows logging the final exit status of the process.
* origin/543-darwin-ansible-ci:
issue #543: install virtualenv for Azure
issue #543: dumb fix for file vs. stat :(
issue #543: disable host key checking
issue #543: create ~/.ssh if it doesn't exist
issue #543: Hide Mitogen test users from gdm
issue #543: skip test that's hard to do on Mac
issue #543: use key from Git, newer ssh-keygen unsupported by Paramiko
image_prep: ensure Mac users can SSH without manual intervention
issue #543: make localhost_ansible_tests run locally
issue #543: add Ansible job to Azure matrix
issue #543: localhost_ansible scripts.
* origin/linear2:
[linear2] fix another test relying on Connection.parent
[linear2] more merge fallout, fix Connection._mitogen_reset(mode=)
[linear2] update mitogen_get_stack for new _build_stack() return value
[linear2] fix mitogen_shutdown_all service context access
docs: changelog concision / additions
add 363 to changelog
docs: update Changelog
docs: note fd usage has halved
docs: more stream-refactor work
docs: update Changelog for stream-refactor.
docs: Add lineinfile bug to changelog.
[linear2] fix MuxProcess test fixture and some merge fallout
service: avoid taking another lock in the usual case
service: don't acquire lock when pool already initialized
profiler: marginal improvements
core: ensure 'exit' signal fires even on Broker crash.
core: wake Waker outside of lock.
core: wake Latch outside of lock.
core: remove old blocking call guard, it's in the wrong place
Make setting affinity optional.
ansible: abstract worker process model.
[stream-refactor] parent: fix crash on graceful shutdown
parent: tidy up create_socketpair()
core: more concise Side.repr.
Given:
- Broker asleep in poll()
- thread B calling Latch.put()
Previously,
- B takes lock,
- B wakes socket by dropping GIL and writing to it
- Broker wakes from poll(), acquires GIL only to find Latch._lock is held
- Broker drops GIL, sleeps on futex() for _lock
- B wakes, acquires GIL, releases _lock
- Broker wakes from futex(), acquires lock
Now,
- B takes lock, updates state, releases lock
- B wakes socket by droppping GIL and writing to it
- Broker wakes from poll(), acquires GIL and _lock
- Everyone lives happily ever after.
Given:
- thread A asleep in Latch._get_sleep()
- thread B calling Latch.put()
Previously,
- B takes lock,
- B wakes socket by dropping GIL and writing to it
- A wakes from poll(), acquires GIL only to find Latch._lock is held
- A drops GIL, sleeps on futex() for _lock
- B wakes, acquires GIL, releases _lock
- A wakes from futex(), acquires lock
Now,
- B takes lock, updates state, releases lock
- B wakes socket by droppping GIL and writing to it
- A wakes from poll(), acquires GIL and _lock
- Everyone lives happily ever after.
Move all details of broker/router setup out of connection.py, instead
deferring it to a WorkerModel class exported by process.py via
get_worker_model(). The running strategy can override the configured
worker model via _get_worker_model().
ClassicWorkerModel is installed by default, which implements the
extension's existing process model.
Add optional support for the third party setproctitle module, so
children have pretty names in ps output.
Add optional support for per-CPU multiplexers to classic runs.
Now it's possible for stream.protocol to not refer to MitogenProtocol,
move the signal handler to a MitogenProtocol subclass instead.
Fixes a crash where CTRL+C during child bootstrap would print
AttributeError.