From f275ea6574b176d0aa730b91384a5261b256b1ba Mon Sep 17 00:00:00 2001 From: "wayo.cavazos" Date: Mon, 29 May 2006 13:49:33 +0000 Subject: [PATCH] Make boids thread friendly --- contrib/x11/examples/boids.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/x11/examples/boids.factor b/contrib/x11/examples/boids.factor index f80c9ddd5e..0c2529779c 100644 --- a/contrib/x11/examples/boids.factor +++ b/contrib/x11/examples/boids.factor @@ -5,7 +5,7 @@ ! To run the program: ! USE: boids setup-window run-boids -USING: namespaces math kernel sequences arrays x11 x ; IN: boids +USING: threads namespaces math kernel sequences arrays x11 x ; IN: boids ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -263,7 +263,7 @@ SYMBOL: boids ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! : iterate-boids ( -- ) - boids get [ iterate-boid ] map boids set ; + boids get [ iterate-boid ] map boids set ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -271,7 +271,7 @@ SYMBOL: boids boids get [ draw-boid ] each flush-dpy ; : run-boids ( -- ) - iterate-boids clear-window draw-boids run-boids ; + iterate-boids clear-window draw-boids 1 sleep run-boids ; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Comments from others: