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
This is likely related at least in part to some of the issues in #183. In #173, we made it so that you could manage multiple turtle windows in multiple threads. We did that by no longer calling process::exit when a window is closed.
Unfortunately, if you create a window in a separate thread, closing the window doesn't actually cause the window to close. The following code reproduces the issue:
use std::thread;use turtle::Turtle;fnmain(){
turtle::start();
thread::spawn(|| {letmut turtle = Turtle::new();for _ in0..360{// Move forward three steps
turtle.forward(3.0);// Rotate to the right (clockwise) by 1 degree
turtle.right(1.0);// panic!(); //TODO: Window should close}});
thread::park();}
Running this code and closing the window at any point should cause the window to disappear. Instead, the window remains open and freezes in place. The commented out panic!() should also cause the window to close, but it also results in the window just freezing instead.
The text was updated successfully, but these errors were encountered:
This is likely related at least in part to some of the issues in #183. In #173, we made it so that you could manage multiple turtle windows in multiple threads. We did that by no longer calling
process::exit
when a window is closed.Unfortunately, if you create a window in a separate thread, closing the window doesn't actually cause the window to close. The following code reproduces the issue:
Running this code and closing the window at any point should cause the window to disappear. Instead, the window remains open and freezes in place. The commented out
panic!()
should also cause the window to close, but it also results in the window just freezing instead.The text was updated successfully, but these errors were encountered: