Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add Thread.join as an alias for Thread.finish
A lot of people from other programming environment backgrounds will
likely try Thread.join, and get very confused when it compiles and
runs but does not synchronize.  Also, the chances of wanting to
perform a string join with a thread is low
  • Loading branch information
hoelzro committed Sep 1, 2015
1 parent 5ba44fc commit fd8b378
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/Thread.pm
Expand Up @@ -45,6 +45,10 @@ my class Thread {
self
}

method join(Thread:D:) {
self.finish
}

multi method Str(Thread:D:) {
"Thread<$.id>($.name)"
}
Expand Down

0 comments on commit fd8b378

Please sign in to comment.