Replies: 1 comment 3 replies
-
Hi @gAlleb, p = ref(false)
thread.when(
predicate.activates(p),
fun() -> begin
print("On activate #{time.up()}")
thread.run({print("Delayed #{time.up()}")}, delay=10., fast=false)
end
)
print("Start #{time.up()}")
thread.run(
fun() -> begin
print("Activate #{time.up()}")
p := true
end,
delay=10.
)
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can we delay the execution of a function on predicate?
E.g. When
brbr = true
- I want to skip a source but with a delay.thread.when(predicate.activates({brbr()}), fun() -> radio.skip())
thread.when(predicate.activates({brbr()}), fun() -> thread.run(my_function, delay=10., fast=false))
doesn't work, of course.Beta Was this translation helpful? Give feedback.
All reactions