-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add Active Messages support #48
Changes from 3 commits
e52c099
2a3c0cb
b34d383
c9be9bd
8cfce99
7725db9
d771d05
6bcb5d4
d6d03c5
89ed4f2
09040e7
e6d96b9
457c454
dece623
3146907
bbf6e27
ffdac10
1484242
bb4ff77
cbd9994
5f6a207
29a5516
bd1787f
d7dcea0
6eb5f95
89dceeb
8770045
f52f145
94d7175
e7e1290
373802e
5c55f82
88e8b34
11769ea
9865724
09ebeda
bd5ac66
a24ca65
3a3aa03
9ebf7ec
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 |
---|---|---|
|
@@ -23,13 +23,6 @@ RequestStream::RequestStream(std::shared_ptr<Endpoint> endpoint, | |
enablePythonFuture), | ||
_length(length) | ||
{ | ||
auto worker = endpoint->getWorker(); | ||
|
||
// A delayed notification request is not populated immediately, instead it is | ||
// delayed to allow the worker progress thread to set its status, and more | ||
// importantly the Python future later on, so that we don't need the GIL here. | ||
worker->registerDelayedSubmission( | ||
std::bind(std::mem_fn(&Request::populateDelayedSubmission), this)); | ||
} | ||
|
||
std::shared_ptr<RequestStream> createRequestStream(std::shared_ptr<Endpoint> endpoint, | ||
|
@@ -41,7 +34,12 @@ std::shared_ptr<RequestStream> createRequestStream(std::shared_ptr<Endpoint> end | |
auto req = std::shared_ptr<RequestStream>( | ||
new RequestStream(endpoint, send, buffer, length, enablePythonFuture)); | ||
|
||
req->_delayedSubmission->setParent(req); | ||
// A delayed notification request is not populated immediately, instead it is | ||
// delayed to allow the worker progress thread to set its status, and more | ||
// importantly the Python future later on, so that we don't need the GIL here. | ||
req->_worker->registerDelayedSubmission( | ||
req, std::bind(std::mem_fn(&Request::populateDelayedSubmission), req.get())); | ||
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. Ah, this needs to be moved from the constructor because we need the 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. Yes, it's not the friendliest design, but it is the best we can do here (I think). |
||
|
||
return req; | ||
} | ||
|
||
|
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.
What does
std::move
do to_collection
? Does it just drain the vector, leaving it "as-if" it were empty again? I guess so.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.
Exactly, that is the standard behavior for the move constructor and operator.