forked from goodboy/tractor
1
0
Fork 0
'structured concurrent `trio`-"actors"'
Go to file
Tyler Goodlet f46d5b2b62 Hackery to override the stdlib's forkserver
The stdlib insists on creating multiple forkservers and semaphore trackers
for each sub-sub-process launched. This isn't ideal since it costs each
`tractor` sub-actor an additional 2 more processes then necessary and is
confusing when viewed as a process tree (eg. via `pstree`).

The majority of the change is simply avoiding the call to
`forkserver.ensure_running()` and `semaphore_tracker.ensure_running()`
in `ForkServer.connect_new_process()` and instead treating the user like
an adult and expecting those calls to be made *once* in the parent most
process (i.e. what `multiprocessing` calls the `MainProcess`).

Really a proper patch should be made against cpython which allows for
similar manual management of the server along with a mechanism to communicate
forkserver and semaphore tracker fd info to sub-processes such that
further calls to `Process.start()` work as expected.

Relates to #6
2018-08-04 18:15:24 -04:00
tests Streaming is too fast, cancel sooner 2018-08-02 16:33:42 -04:00
tractor Hackery to override the stdlib's forkserver 2018-08-04 18:15:24 -04:00
.gitignore Initial commit 2018-07-05 16:01:15 -04:00
.travis.yml Drop console logging 2018-08-02 16:29:01 -04:00
LICENSE Initial commit 2018-07-05 16:01:15 -04:00
README.md Initial commit 2018-07-05 16:01:15 -04:00
requirements-test.txt Add trio plugin for testing 2018-07-11 22:20:13 -04:00
setup.py Add trio framework classifier 2018-07-10 17:27:47 -04:00

README.md

tractor

async, multicore, distributed Python built on trio