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

New tests #39

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

New tests #39

wants to merge 9 commits into from

Conversation

xiayufeilucy
Copy link
Contributor

No description provided.

@gatoWololo
Copy link
Owner

gatoWololo commented May 12, 2020

Thanks Lucy!

Could you make the following modifications to the code before we merge it:

  • Currently it is hard-coded to spawn 10 threads/workers. Could you make this value parametric based on command line argument input? You can use std::env::args
  • Currently the only "real" thread code is sender.send(1 /*token*/); this has every thread send a message to the next thread. No one is ever reading the message and every thread is sending the message. We only want the first thread to send the token and all other threads should wait on it. The code I gave you was just setting up the topology but we need to add the logic for passing the message around the ring.

Copy link
Owner

@gatoWololo gatoWololo left a comment

Choose a reason for hiding this comment

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

So this example is more complicated than I originally thought. Here are some comments to fix to get the tests where we want it.

examples/ring_topology.rs Outdated Show resolved Hide resolved
examples/ring_topology.rs Outdated Show resolved Hide resolved
examples/ring_topology.rs Outdated Show resolved Hide resolved
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.

2 participants