You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, ^C causes Racket to signal an exn:break in a random Syndicate actor. This is perfectly backwards: we want the ground-vm to catch such signals and engage in a protocol to negotiate shutdown with the contained actors.
@howell's suggestion is fundamentally sound: change run-ground from (in essence) its current (loop) to (sync (thread (lambda () (loop)))). The reason for this is the (undocumented?) fact that exn:break is only ever delivered to the main Racket thread.
Complications: terminating the loop when the outer thread terminates, i.e., ensure a bidirectional connection; and implementing the protocol to allow actors to control break-based termination. A sketch of the whole thing:
At the moment, ^C causes Racket to signal an
exn:break
in a random Syndicate actor. This is perfectly backwards: we want the ground-vm to catch such signals and engage in a protocol to negotiate shutdown with the contained actors.@howell's suggestion is fundamentally sound: change
run-ground
from (in essence) its current(loop)
to(sync (thread (lambda () (loop))))
. The reason for this is the (undocumented?) fact thatexn:break
is only ever delivered to the main Racket thread.Complications: terminating the
loop
when the outer thread terminates, i.e., ensure a bidirectional connection; and implementing the protocol to allow actors to control break-based termination. A sketch of the whole thing:... where
loop
monitorsouter-thread
, terminating (without engaging in any kind of protocol) if it terminates.The text was updated successfully, but these errors were encountered: