This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running a background thread REPL on Android


* 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]