Skip to content

Ring of clients: bad version with synchrony issues#15

Open
iarekk wants to merge 3 commits into
mainfrom
ring-of-clients
Open

Ring of clients: bad version with synchrony issues#15
iarekk wants to merge 3 commits into
mainfrom
ring-of-clients

Conversation

@iarekk
Copy link
Copy Markdown
Owner

@iarekk iarekk commented Sep 1, 2022

No description provided.

Comment thread lib/ch16/exercise4/ticker_ring.exs Outdated
# @name :ticker_ring

def generate(client_id, next_pid, is_active) do
if(is_nil(next_pid)) do
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

this is a crutch that needs addressing

Comment thread lib/ch16/exercise4/ticker_ring.exs Outdated
end

pid1 = spawn(Ch16.Exercise4.TickerRing, :generate, ["1", nil, true])
:timer.sleep(10)
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

without timers, processes don't repoint themselves to themselves from nil. Should be an easy fix

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.

1 participant