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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function Worker #267

Merged
merged 39 commits into from
Jun 28, 2023
Merged

Function Worker #267

merged 39 commits into from
Jun 28, 2023

Conversation

futursolo
Copy link
Collaborator

@futursolo futursolo commented Nov 5, 2022

This pull request:

  1. Moved actor model workers to gloo::worker::actor, exported to gloo::worker.
  2. Moved most trait requirements from the Worker trait definition to its Spawner and Registrar.
  3. Fixed an issue where Worker::connected is not being called upon bridge connection.
  4. Added gloo::worker::oneshot as an 1:1 worker type, constructed via procedural macro.
  5. Added gloo::worker::reactor and a M:N worker type, constructed via procedural macro.

Still missing:

  1. Documentation.
  2. Tests for Reactor Worker.

Fix #251.

@databasedav
Copy link

incredible stuff 🙏

@ranile ranile marked this pull request as ready for review June 4, 2023 18:34
@ranile
Copy link
Collaborator

ranile commented Jun 4, 2023

@futursolo I added docs and test for the reactor worker. Hopefully this PR is ready for merge. If you could review my changes, that would be great

.github/workflows/tests.yml Show resolved Hide resolved
crates/worker-macros/Cargo.toml Outdated Show resolved Hide resolved
@ranile
Copy link
Collaborator

ranile commented Jun 17, 2023

@futursolo have a look again

Copy link
Collaborator Author

@futursolo futursolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot approve this PR because I created it.
Other than the mistake in the sentence, which might be due to me, LGTM.

crates/worker-macros/src/worker_fn.rs Outdated Show resolved Hide resolved
Co-authored-by: Kaede Hoshikawa <futursolo@users.noreply.github.com>
@ranile
Copy link
Collaborator

ranile commented Jun 17, 2023

I'm confused why CI is failing. The test passes for me locally

@futursolo
Copy link
Collaborator Author

Maybe try to run CI with Firefox only?

the example crashes only in CI for some reason
@futursolo futursolo merged commit ade9965 into rustwasm:master Jun 28, 2023
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.

Proposal: Function Worker
3 participants