inim-repl / INim

Interactive Nim shell / REPL / Playground
MIT License
642 stars 23 forks source link

os.sleep is not working properly #119

Open hamidb80 opened 3 years ago

hamidb80 commented 3 years ago

info:

the code:

import os

nim> proc uuu=   
     echo "start"
     sleep 1000
     echo "end"

nim> uuu()

result: it prints "end" immediately after printing "start"

expected behavior: it should sleep for 1s and then print "end"

0atman commented 2 years ago

Confirmed.

I wonder if it is something to do with the whole line being executed and only then the output is printed?