-
-
Notifications
You must be signed in to change notification settings - Fork 102
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Igni/actor branch replay #327
Draft
o0Ignition0o
wants to merge
41
commits into
relrin/bastion-actor-trait
Choose a base branch
from
igni/actor_branch_replay
base: relrin/bastion-actor-trait
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Igni/actor branch replay #327
o0Ignition0o
wants to merge
41
commits into
relrin/bastion-actor-trait
from
igni/actor_branch_replay
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Executor rework
Signed-off-by: பாலாஜி <[email protected]>
Signed-off-by: பாலாஜி <[email protected]>
* bump lever * bump nuclei
* wip, allow to run tokio based futures in the bastion executor * use tokio::main! * runtime handles * wip, adding tests and making them compatible with runtime-tokio * ok docs remaining, no clue how to handle it * wip, doctests * wip: getting there... * tests are finally passing! * runtime-tokio => tokio-runtime * tokio_test is amazing <3 * woopsie * prepare for master, so we can beta test the tokio feature
Fixes #298 Signed-off-by: Marc-Antoine Perennou <[email protected]>
…` doesn't exist. (#279) Run RustFmt.
Transitioning to intra-doc-link will allow us to get better feedback about broken links in the future. It also allows us to remove some annotations that are guessed by rustdoc. This commit *should* translate every link to intra-doc-link.
* Add initial implementation for MessageHandler This commit adds very basic implementation of MessageHandler. This structure stores a SignedMessage, and calls, depending on which kind of message it is, and on its underlying type, either a specified closure, or a fallback one. The goal is to provide an API that would be nicer to work with than the msg! macro. Current implementation features a state-machine like algorithm and currently only handles messages that can responded to (aka "questions"). * Make AnswerSender carry its own signature. This allows us not to trust caller of AnswerSender::reply to provide a correct signature. As such, the corresponding method can be documented. This is necessary because such method may be called in the closure that are passed to MessageHandler::with_question. Note: this commit renames AnswerSender::send to AnswerSender::respond, and removes the signature part. This method is public but not documented. As such, this theorically breaking change should not break any code. * Add on_* functions This allows us to match on both regular messages (the ones we can't respond to) as well as the broadcasts. It follows the same model established previously. * Add documentation for MessageHandler API * Make sender address available for each on_* function * Allow MessageHandler to return something Previous implementation of MessageHandler always returned nothing, as it was not considered important. However, returning something is important at least in the fibonacci example. This commit allows the MessageHandler to return some data. It requires every matcher to return the same data type. This data is stored in the MessageHandler and returned by the on_fallback function. * Rewrite the fibonacci example with MessageHanlder * Remove useless clone by destructuring on fallback. This allows us to remove additional code. * Add a proof of concept that we can match over different types using the MessageHandler Co-authored-by: Jeremy Lempereur <[email protected]>
Previous pull request[1] introduced the MessageHandler datatype, but did not export it in the prelude. Examples have been updated so that they don't import MessageHandler manually. [1]: #309
* wip * wip, a lot left! * a bit of debug statements and more funsies * tell and tell_everyone are working. * ok we're almost there, lets see if i can handle a vec<replies> and if i can register ppl to a new Distributor * yay it works! * lints * 19 lints remaining * 9 warnings to go * docs + tests * i think we re good to go * example fix * san * move miri to a .sh file * bump nightlies and anyhow * clippy pass + prepare to merge
* proposal: distributor request fn * go async by default, add a sync variant backed by mpsc::channel * let the example runwith or without the tokio-runtime feature * fix: sometimes the children weren't attached to the dispatcher * use RwLock for now * add an after_start callback to know exactly when the children have spawned and the distributor is ready to receive and dispatch messages to everyone * wip * merge tests * split the tokio and the regular test runner so that both pass
* dispatch to available children only. (#268) * Fix RestartStrategy::timeout < 1s (#265) * Renamed ActorStateData struct to Context * Extended available states for Actor * Added methods for additional states * Added removed state * Added definition module * Added Definition struct * Removed unsafe Send and Sync implementation for MailboxTx * Added docstrings for Mailbox<T> * Added tests for the Definition struct * Added presaving messages * Removed excessive imports * Added methods for getting latest message * Removed reference for the returned envelope * Code review changes
Relrin
force-pushed
the
relrin/bastion-actor-trait
branch
from
July 4, 2021 22:20
fb29cfb
to
90fe2c9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
cargo test
.