question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: loop until a condition is met

See original GitHub issue

It can be useful to loop until a condition is met.

This could be done with something like a whileTrue hook, which would call back with true or false to indicate whether the loop should continue and would have access to the full context.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:12
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Cristy94commented, Aug 18, 2017

Let’s say you have a chat room which is full and users sometimes leave the room. You might want to loop sending a join-room event until you can finally join (someone left and the room is not full anymore).

2reactions
hassycommented, Jun 22, 2017

Thanks for the info @joesb. Always helpful to have some real use cases in mind when adding a feature!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to repeat loop until condition is met? While or For Loop?
I wanted to create a loop until a certain condition is met, for example lets say I have constant x, that is included...
Read more >
How to while loop that only run when certain condition is met
If it found a new record it will do function B and stop until the condition is met again. I'm new to programming...
Read more >
Performing Actions Until a Condition is no Longer True Using ...
Javascript while loops only execute the instructions they contain if the end condition has not yet been met. Before each iteration of a...
Read more >
VBA Do Until Loop - WallStreetMojo
Do Until Loop means to do something until the condition becomes TRUE. It is like a logical function that works based on TRUE...
Read more >
Python While Loop (Tutorial With Examples) - Trytoprogram
Loops are either infinite or conditional. Python while loop keeps reiterating a block of code defined inside it until the desired condition is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found