Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop sync func invocation support. #205

Merged
merged 7 commits into from Apr 28, 2021
Merged

Drop sync func invocation support. #205

merged 7 commits into from Apr 28, 2021

Conversation

goodboy
Copy link
Owner

@goodboy goodboy commented Apr 27, 2021

Resolves #77.

Realized we had a bunch of arbiter methods that were sync and of course now the concurrent primes example function needs to be async. Looks a little unwelcoming imo but then again if peeps are here and don't want to make everything async maybe it's the wrong spot 馃槀

Also, as mentioned in the readme, trio-parallel for anyone who wants the sync func support.

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.
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
@goodboy
Copy link
Owner Author

goodboy commented Apr 27, 2021

@richardsheridan if there's any other pointers you'd want us to have to your repo just say the word.

@goodboy goodboy merged commit a5a88e2 into master Apr 28, 2021
@goodboy goodboy deleted the drop_sync_funcs branch April 28, 2021 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do we need to support invoking sync functions?
1 participant