Running a background thread REPL on Android

Helmut Eller eller.helmut@gmail.com
Tue Jan 24 09:01:00 GMT 2012


* Remco van 't Veer [2012-01-24 08:10] writes:

> You should start a thread, not run it;
>
> - ((java.lang.Thread (runnable (start-repl 4444 (this)))):run)
> + ((java.lang.Thread (runnable (start-repl 4444 (this)))):start)

Another problem is that runnable should be called with a function as
argument.  The way it is written, runnable is called with the result of
start-repl only after start-repl returns.

Using (future (start-repl 4444 (this))) is probably the easier way to
start a new thread.

Helmut




More information about the Kawa mailing list