cvsuser 04/08/10 00:46:45
Modified: t/pmc threads.t
Log:
sync threads_6 ending
Revision Changes Path
1.9 +9 -3 parrot/t/pmc/threads.t
Index: threads.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/threads.t,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- threads.t 30 Mar 2004 10:23:29 -0000 1.8
+++ threads.t 10 Aug 2004 07:46:45 -0000 1.9
@@ -1,6 +1,6 @@
#! perl -w
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: threads.t,v 1.8 2004/03/30 10:23:29 leo Exp $
+# $Id: threads.t,v 1.9 2004/08/10 07:46:45 leo Exp $
=head1 NAME
@@ -257,19 +257,25 @@
find_global P5, "_foo"
new P2, .ParrotThread
find_method P0, P2, "thread3"
- set I3, 1
+ new P6, .TQueue # need a flag that thread is done
+ set I3, 2
invoke # start the thread
set I5, P2
getinterp P2
find_method P0, P2, "detach"
invoke
+wait:
+ defined I0, P6
+ unless I0, wait
print "done\n"
- sleep 0.1
end
.pcc_sub _foo:
print "thread\n"
+ sleep 0.1
+ new P2, .PerlInt
+ push P6, P2 # push item on queue
invoke P1
CODE
/(done\nthread\n)|(thread\ndone\n)/