mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
made buzz.pl support multiple subdirectories
got thread killing code actually working. super exciting.
This commit is contained in:
@@ -73,6 +73,16 @@ public class ProcessingApplet extends Applet
|
||||
thread.stop();
|
||||
thread = null;
|
||||
}
|
||||
|
||||
// kill off any associated threads
|
||||
Thread threads[] = new Thread[Thread.activeCount()];
|
||||
Thread.enumerate(threads);
|
||||
for (int i = 0; i < threads.length; i++) {
|
||||
if (threads[i].getName().indexOf("Thread-") == 0) {
|
||||
//System.out.println("stopping " + threads[i].getName());
|
||||
threads[i].stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+11
-2
@@ -17,7 +17,7 @@ $temp_dir = "buzztemp";
|
||||
if (-d $temp_dir) {
|
||||
`rm -rf $temp_dir`;
|
||||
}
|
||||
mkdir($temp_dir, 0777) || die $!;
|
||||
mkdirs($temp_dir, 0777) || die $!;
|
||||
|
||||
if ($ENV{'WINDIR'} ne '') {
|
||||
$separator = "\\";
|
||||
@@ -83,7 +83,7 @@ foreach $arg (@ARGV) {
|
||||
$dir = '.';
|
||||
} else {
|
||||
#print "creating dir $temp_dir$separator$dir\n";
|
||||
mkdir("$temp_dir$separator$dir", 0777) || die $!;
|
||||
mkdirs("$temp_dir$separator$dir", 0777) || die "$temp_dir$separator$dir $!";
|
||||
}
|
||||
opendir(DIR, $dir) || die $!;
|
||||
@dcontents = readdir(DIR);
|
||||
@@ -215,3 +215,12 @@ sub read_negative {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# recursively make directories if they don't yet exist
|
||||
# this turned into a hack because i was lazy
|
||||
sub mkdirs {
|
||||
my $d = @_[0];
|
||||
$d =~ s/\\/\//g;
|
||||
my $result = `d:\\cygwin\\bin\\mkdir -p $d`;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user