-
Notifications
You must be signed in to change notification settings - Fork 211
Add constrained read/write-only ports #20
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,11 +12,11 @@ | |
(take! [port fn1-handler] "derefable val if taken, nil if take was enqueued")) | ||
|
||
(defprotocol WritePort | ||
(put! [port val fn0-handler] "derefable nil if put, nil if put was enqueued. Must throw on nil val.")) | ||
|
||
(defprotocol Channel | ||
(put! [port val fn0-handler] "derefable nil if put, nil if put was enqueued. Must throw on nil val.") | ||
(close! [chan])) | ||
|
||
(defprotocol Channel) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't in use any more. Should it stick around as a marker protocol? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also raises the question of whether or not there should be type predicates for channels & ports. |
||
|
||
(defprotocol Handler | ||
(active? [h] "returns true if has callback. Must work w/o lock") | ||
#_(lock-id [h] "a unique id for lock acquisition order, 0 if no lock") | ||
|
@@ -25,4 +25,4 @@ | |
(defprotocol Buffer | ||
(full? [b]) | ||
(remove! [b]) | ||
(add! [b itm])) | ||
(add! [b itm])) |
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.
This didn't change. Only moved.