A lot of good suggestions. I think being able to interrupt all functions in the REPL is the way to go.
I will create a JIRA for this. I am not planning on tackling this in the near term, so if anyone else would like a go, please feel free. On Thu, Nov 17, 2016 at 9:34 AM, Casey Stella <[email protected]> wrote: > I've thought about this a bit more. I think the ctrl-c hook should be > done in such a way that it works for all functions, not a > function-by-function basis, and it should be a capability of the REPL. > Ctrl-C should stop the running stellar function, regardless of the > function. I'd suggest running the stellar function in a separate thread, > joining on the thread, and have the interrupt handler call interrupt() on > the thread when ctrl-C is called. > > On Wed, Nov 16, 2016 at 9:23 PM, Otto Fowler <[email protected]> > wrote: > >> Nick, >> How were you thinking to do this? With apply having to return a value and >> all? >> >> >> On November 16, 2016 at 15:54:21, Nick Allen ([email protected]) wrote: >> >> Is there any way for a user to send an interrupt-like signal in the >> Stellar >> REPL? >> >> I'd like to modify the KAFKA_TAIL function so that the user can >> continually >> read messages from a Kafka topic, rather than a fixed number, and then >> decide to stop tailing the messages by some kind of keystroke; CTRL-C >> -ish. Currently, a CTRL-C/SIGINT will kill the entire Stellar REPL instead >> of just the currently running function. >> >> >> -- >> Nick Allen <[email protected]> >> > > -- Nick Allen <[email protected]>
