On Friday, November 4, 2016 at 1:28:16 PM UTC-4, David Anthoff wrote:
>
>
> The complete setup is slightly more complicated, but you can imagine just 
> the following: start a normal julia REPL. Then include a file that will 
> start a server listening on some socket. This server is all async, so as 
> soon as the server is started, the prompt appears again and one can use 
> this REPL window in the normal way. Now some other process connects to the 
> socket, and sends some code that this server will eval. Before the server 
> evals this code, I would like it to switch off the prompt, then eval the 
> code, then switch the prompt on again.
>

Base.Terminals.clear(Base.active_repl.t); sleep(10)

will clear the REPL window (including prompt) for 10 seconds.  Instead of 
sleep(10), you can do wait(c) where c is a Condition variable that gets 
notified by the server thread once it is ready. 
 See http://docs.julialang.org/en/latest/stdlib/parallel/?highlight=wait

Reply via email to