#lang rhombus/static import: lib("web-server/http.rkt") open lib("web-server/servlet.rkt") open lib("web-server/servlet-env.rkt") open "thread/thread.rhm" open fun start(req): #{response/xexpr}("Hello world!") //#{serve/servlet}(start, #{#:launch-browser?}: #false, #{#:servlet-path}: "/game") fun loop(): println("Hello World!") sleep(1) loop() fun hello(): let thread_evt = thread_receive_evt() let sync_res = sync_timeout(1/500, thread_evt) if !sync_res | println("No sync result") | println("Got message " +& thread_receive()) println("Creating thread") def thr: thread(hello) thread_send(thr, "Hello") thread_wait(thr) println("Thread done")