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

Implement draft #13

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Implement draft #13

wants to merge 3 commits into from

Conversation

zoey1124
Copy link

  • Fully implement Python version of ConcurrentAdder
  • Finish draft for SharedList

* Fully implement Python version of ConcurrentAdder
* Finish draft for SharedList
Copy link
Contributor

@edwardalee edwardalee left a comment

Choose a reason for hiding this comment

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

The SharedList looks like the start of a design where a list is passed around among reactors that modify the list. An alternative design that might be more consistent with the name "SharedList" is one where a number of reactors maintain a copy of a shared list and instead of passing around the list, they pass around their modifications to the list. See C/src/DistributedDatabase/ReplicatedDatabase.lf in the examples repo for an illustration of such a design.


main reactor(stride(10), period(1 sec), N(4)) {
c = new Counter(stride=stride, period=period);
a = new[4] Adder();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this meant to be

     a = new[N] Adder();

=}
}

reactor Adder(bank_value(1)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this meant to be bank_index rather than bank_value?

@@ -0,0 +1,54 @@
'''
This is a shared itemlist for multiple people
to appendItem or deltetItem at the same time
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
to appendItem or deltetItem at the same time
to appendItem or deltetItem at the same time.

c = new Counter(stride = 1)
p = new Printer()
c.out -> p._in
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
}

p = new Printer(N=N);
(c.out)+ -> a._in;
a.out -> p._in;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
}

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