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

Fix sending commands to multiple frontends. #338

Merged
merged 1 commit into from
Aug 7, 2019

Conversation

twavv
Copy link
Member

@twavv twavv commented Aug 5, 2019

This also reworks the way that new channels are added to a scope to work more
synchronously and avoid some race conditions.

Fixes #337 .

This reworks the way that new channels are added to a scope to work more
synchronously and avoid some race conditions.
@twavv twavv requested review from shashi and rdeits August 5, 2019 07:14
@codecov
Copy link

codecov bot commented Aug 5, 2019

Codecov Report

Merging #338 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #338   +/-   ##
=======================================
  Coverage   60.23%   60.23%           
=======================================
  Files          16       16           
  Lines         596      596           
=======================================
  Hits          359      359           
  Misses        237      237
Impacted Files Coverage Δ
src/connection.jl 84.61% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f92d471...25ac56e. Read the comment docs.

@rdeits
Copy link
Collaborator

rdeits commented Aug 7, 2019

Thanks! I can confirm that this fixes the original issue. I'll just need to update the wait() implementation in MeshCat to use the new connection pool.

Copy link
Collaborator

@rdeits rdeits left a comment

Choose a reason for hiding this comment

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

This looks good--thanks for the fix! I've verified that MeshCat.jl also works with this change.

@twavv twavv merged commit 9d936ff into master Aug 7, 2019
end
while isready(pool.new_connections)
push!(pool.connections, take!(pool.new_connections))
wait(pool.condition)
Copy link
Member

Choose a reason for hiding this comment

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

Little tiny race condition possible here if a new condition arrives in between isempty and wait. This might need a lock, eventually.

sleep(0.25)
@test value(w1) == "updated"
@test value(w2) == "updated"
end
Copy link
Member

Choose a reason for hiding this comment

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

sweet tests!

@shashi shashi deleted the td/fix-multi-conn-updates branch August 8, 2019 03:53
@tkoolen
Copy link
Contributor

tkoolen commented Aug 23, 2019

Could we ask you guys for a new tag with this fix? CC:@rdeits.

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.

Pushing an observable to multiple clients no longer works in WebIO 0.8.9
4 participants