Paste: try hotrun

Author: erdo
Mode: factor
Date: Thu, 25 Nov 2021 20:06:39
Plain Text |
USING: kernel io threads vocabs.refresh ;
IN: hotrun

CONSTANT: message "y"

: main-loop ( -- )
    message write nl yield main-loop ;

: hot-refresh ( -- )
    refresh-all yield hot-refresh ;

: setup-then-main-loop ( -- )
    [ hot-refresh ] "hot reload thread" spawn drop
    [ main-loop ] "mock app test" spawn drop ;

: main-tight-loop ( -- )
    message write nl main-tight-loop ;

MAIN: setup-then-main-loop

New Annotation

Summary:
Author:
Mode:
Body: