-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: main
Are you sure you want to change the base?
Implement draft #13
Conversation
zoey1124
commented
Aug 18, 2022
- Fully implement Python version of ConcurrentAdder
- Finish draft for SharedList
* Fully implement Python version of ConcurrentAdder * Finish draft for SharedList
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
p = new Printer(N=N); | ||
(c.out)+ -> a._in; | ||
a.out -> p._in; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |