Replies: 2 comments 22 replies
-
Do you have a proposed syntax for the function you are looking for, some examples of how it would work? As mentioned in #18 you may think it looks like a modified or more featureful version of |
Beta Was this translation helpful? Give feedback.
-
Thanks for merging #23! Super helpful! Feels great to get started with wlandau/crew#108. As I get started, I am remembering #20 (reply in thread):
I am just now realizing how important user interrupts are here. Do you still have plans for that? On my end on Mac OS, it seems CTRL-C has no effect when I run |
Beta Was this translation helpful? Give feedback.
-
nextget("cv")
andmirai(.signal = TRUE)
are incredibly useful. We have already discussedcv_value(nextget("cv"))
as a constant-time way to count unresolved tasks (shikokuchuo/mirai#78 (reply in thread)). Developmentcrew
already does this.Now, I am thinking of ways that
nextget("cv")
could reduce polling in bothcrew
andtargets
. There is a ton of potential. The crux is wherecrew
either:I would like to use something like
until(nextget("cv"))
. It's simple in theory, but I find myself struggling:until()
decrements the cv. This is a challenge becausecrew
thinkscv_value(nextget("cv"))
is total cumulative number of resolved tasks. To use the cv correctly for Extended R dispatcher mirai#78 (reply in thread), I have to add back 1 if the cv was originally positive. And it's hard to tell if the cv was originally positive without hitting a race condition.until()
only sleeps ifcv_value()
is positive. I am not sure how to wait until all tasks resolve. It would be easier if the sleep could start at any value and simply wait for a change. If there were a way to wait until the cv climbs up to a user-defined fixed positive value, then this would be easier still.Beta Was this translation helpful? Give feedback.
All reactions