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

Remove num_threads as a parameter. #1891

Merged
merged 8 commits into from
Apr 14, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add additional checks.
  • Loading branch information
elibol authored and pcmoritz committed Apr 14, 2018
commit c30a6e5f0823a9013258414bcaf71bb62276a698
2 changes: 2 additions & 0 deletions src/ray/object_manager/object_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ ray::Status ObjectManager::DequeueTransfers() {
// Dequeue receives.
while (true) {
if (std::atomic_fetch_add(&num_transfers_receive_, 1) < max_receives_) {
RAY_CHECK(num_transfers_receive_ <= max_receives_);
RAY_CHECK(num_transfers_send_ + num_transfers_receive_ <= num_threads_);
TransferQueue::ReceiveRequest req;
bool exists = transfer_queue_.DequeueReceiveIfPresent(&req);
Expand All @@ -241,6 +242,7 @@ ray::Status ObjectManager::DequeueTransfers() {
// Dequeue sends.
while (true) {
if (std::atomic_fetch_add(&num_transfers_send_, 1) < max_sends_) {
RAY_CHECK(num_transfers_send_ <= max_sends_);
RAY_CHECK(num_transfers_send_ + num_transfers_receive_ <= num_threads_);
TransferQueue::SendRequest req;
bool exists = transfer_queue_.DequeueSendIfPresent(&req);
Expand Down