forked from goodboy/tractor
1
0
Fork 0
Commit Graph

1455 Commits (73befac9bc3d4be5ae94fff3b44287b8bf0b31ff)

Author SHA1 Message Date
Tyler Goodlet d0eacc3fd6 Appease mypy 2021-04-27 12:08:30 -04:00
Tyler Goodlet 89ce1a63e4 Only accept asyncfunc response type 2021-04-27 12:08:30 -04:00
Tyler Goodlet 1f1619c730 Convert all test suite sync funcs 2021-04-27 12:08:30 -04:00
Tyler Goodlet 5798ef6796 Enforce async funcs on callee side, convert arbiter methods 2021-04-27 12:08:30 -04:00
Tyler Goodlet c2a1612bf5 Drop sync function support
You can always wrap a sync function in an async one and there seems to
be no good reason to support invoking them directly especially since
cancellation won't work without some thread hackery. If it's requested
we'll point users to `trio-parallel`.

Resolves #77
2021-04-27 12:08:30 -04:00
Tyler Goodlet be22a2526a Add `Actor.cancel_soon()` for sync self destruct
Add a sync method that can be used to cancel the current actor from
a synchronous context. This is useful in debugging situations where
sync debugger code may need to kill the process tree.

Also, make the internal "lifetime stack" a global var; easier to manage
from client code that may was to add callbacks prior to the actor
runtime being fully setup.
2021-04-27 11:35:28 -04:00
Tyler Goodlet a13b3fe0a5 Bump alpha version 2021-04-27 11:35:16 -04:00
goodboy 0f4f7f05cb
Merge pull request #202 from goodboy/first_pypi_release
First alpha
2021-02-28 22:02:00 -05:00
Tyler Goodlet 34064cd2c7 Tweak classifiers 2021-02-28 20:44:45 -05:00
goodboy ac30374a15
Merge pull request #201 from goodboy/single_func_example
Single func example
2021-02-27 18:04:15 -05:00
Tyler Goodlet e80ab60e0b Add pypi install line 2021-02-27 16:10:57 -05:00
Tyler Goodlet c07a5f6e11 Try fix worker pool link, again 2021-02-27 16:08:44 -05:00
Tyler Goodlet 3766731de5 Add a single func ex for our first one 2021-02-27 14:25:12 -05:00
Tyler Goodlet 2f8dd0199d Tweak version for release, add 3.9 tag 2021-02-25 23:51:53 -05:00
goodboy a0981be1fa
Merge pull request #163 from goodboy/readme_pump
Readme rework draft
2021-02-25 09:24:57 -05:00
Tyler Goodlet 0679eb5646 Further simplifications 2021-02-25 09:10:18 -05:00
Tyler Goodlet ab192741ce Fix code indent and worker pool link 2021-02-25 09:10:18 -05:00
Tyler Goodlet 8ee9007798 Reorg and rejig flow
Thanks to @richardsheridan for many suggestions!
2021-02-25 09:10:18 -05:00
Tyler Goodlet f342c3a0c4 Attempt to add logo 2021-02-25 09:10:18 -05:00
Tyler Goodlet 0c8f9dbce0 Add comma 2021-02-25 09:10:18 -05:00
Tyler Goodlet 71a35aadef Drop worker pool and add debug example 2021-02-25 09:10:18 -05:00
Tyler Goodlet 4a512bc879 Compress terminal cmd line lens 2021-02-25 09:10:18 -05:00
Tyler Goodlet 0e7db46631 Revert auto-gen readme and merge in auto-gen code blocks by hand for now 2021-02-25 09:10:18 -05:00
Tyler Goodlet 92f4b402ad Draft use sphinx-restbuilder to gen readme 2021-02-25 09:10:18 -05:00
Tyler Goodlet 90c987d0ae Further tweaks, add non-scary snippet 2021-02-25 09:10:18 -05:00
Tyler Goodlet 0a5a4d8487 Readme rework draft 2021-02-25 09:10:18 -05:00
goodboy 49a02e6700
Merge pull request #198 from goodboy/kinda_drop_run
Kinda drop run
2021-02-25 09:09:41 -05:00
Tyler Goodlet 47565cfbf3 Use root as default name from `tractor.run()` 2021-02-25 08:51:28 -05:00
Tyler Goodlet cd636b270e Update debug tests to expect 'root' actor name 2021-02-24 13:38:20 -05:00
Tyler Goodlet b7b2436bc1 Remove tractor run from some debug examples 2021-02-24 13:14:40 -05:00
Tyler Goodlet 8fabd27dbe Lint fixes 2021-02-24 13:13:51 -05:00
Tyler Goodlet 983e66b31b Add second implicit-runtime-boot branch 2021-02-24 13:13:45 -05:00
Tyler Goodlet b285db4c58 Factor OCA supervisor into new func 2021-02-24 13:13:38 -05:00
goodboy 35775c6763
Merge pull request #176 from goodboy/eg_worker_poolz
Add our version of the std lib's "worker pool"
2021-02-22 09:55:23 -05:00
Tyler Goodlet 2b3beac4b4 Test putting readme in docs dir 2021-02-21 17:52:04 -05:00
goodboy 35dc56d2c5
Merge pull request #194 from goodboy/sync_breakpoint
Support sync code breakpointing via built-in
2021-02-21 17:49:43 -05:00
Tyler Goodlet a93321e48e Don't run stdlib example as part of test set 2021-02-21 15:41:21 -05:00
Tyler Goodlet 5ffd2d2ab3 Ignore type checks on stdlib overrides 2021-02-21 14:08:23 -05:00
Tyler Goodlet f7e1c526c5 Add `aclosing()` around asyn gen loop 2021-02-21 14:08:23 -05:00
Tyler Goodlet 07653bc02e Run parallel examples 2021-02-21 14:08:23 -05:00
Tyler Goodlet a90a2b8787 Contain the error 2021-02-21 14:08:23 -05:00
Tyler Goodlet da8c8c1773 Add concise readme example 2021-02-21 14:08:23 -05:00
Tyler Goodlet 57a24cdcf8 More comments 2021-02-21 14:08:23 -05:00
Tyler Goodlet 9b07e9ad7c Yield results on demand using a mem chan 2021-02-21 14:08:23 -05:00
Tyler Goodlet 3c320f467f Remove use of tractor.run() 2021-02-21 14:08:23 -05:00
Tyler Goodlet 2555765882 Make new paralellism example space 2021-02-21 14:08:23 -05:00
Tyler Goodlet 7db5739143 Add our version of the std lib's "worker pool"
This is a draft of the `tractor` way to implement the example from the
"processs pool" in the stdlib's `concurrent.futures` docs:

https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor-example

Our runtime is of course slower to startup but once up we of course get
the same performance, this confirms that we need to focus some effort
not on warm up and teardown times.  The mp forkserver method definitely
improves startup delay; rolling our own will likely be a good hot spot
to play with.

What's really nice is our implementation is done in approx 10th the code ;)

Also, do we want offer and interface that yields results as they arrive?

Relates to #175
2021-02-21 14:08:23 -05:00
Tyler Goodlet 7888ef6f01 Fix more stdlib typing issues with latest mypy 2021-02-21 12:48:03 -05:00
Tyler Goodlet 109066dda9 Support sync code breakpointing via built-in
Override `breakpoint()` for sync code making it work
properly with `trio` as per:

https://github.com/python-trio/trio/issues/1155#issuecomment-742964018

Relates to #193
2021-02-21 12:36:00 -05:00
goodboy d8b6c0093c
Merge pull request #188 from goodboy/we_aint_got_zombie_shields
We aint got zombie shields
2021-01-18 11:01:14 -05:00