Open bennytheshap opened 8 years ago
Implementing this is super simple. You would just implement it exactly the same as In _ seconds do, but my only questions would be: Is there a block to be able to stop this callback event? and if so, how do we distinguish between multiple ones. For example:
start do
every_seconds 5, do
say "hello"
end
every_seconds 9, do
say "goodbye"
end
end
receive_message "stop saying hello" do
end
every_seconds 5, do say “yo dawg” until is_tired(dog)
On Aug 31, 2015, at 10:54 PM, Matthew Ahrens notifications@github.com wrote:
Implementing this is super simple. You would just implement it exactly the same as In \ seconds do_, but my only questions would be: Is there a block to be able to stop this callback event? and if so, how do we distinguish between multiple ones. For example:
start do
every_seconds 5, do
say "hello"
end
every_seconds 9, do
say "goodbye"
end
end
receive_message "stop saying hello" do
how do we stop? but leave the other one alone. Or does that matter?
end
— Reply to this email directly or view it on GitHub https://github.com/tufts-LPC/blockytalky_elixir/issues/44#issuecomment-136586457.
Or even...
let thingie = every_seconds 5, do
say "yo dawg"
end
#some_other_place
stop_doing thingie
In _ seconds do once, fires once. I'm imagining a block that repeatedly does something, but that only does it every so often