Skip to content

Commit 09b5e81

Browse files
committed
Rework Thread.new -> Thread.start
1 parent cd224ef commit 09b5e81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

S32-io/IO-Socket-INET.t

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,8 @@ eval-lives-ok 'for ^2000 { IO::Socket::INET.new( :port($_), :host("127.0.0.1") )
242242

243243
sub do-test(Block $b-server, Block $b-client) {
244244
my $sync = Channel.new;
245-
my $thread = Thread.new(
246-
code => {
245+
my $thread = Thread.start(
246+
{
247247
my $server = IO::Socket::INET.new(:localhost<localhost>, :localport(0), :listen);
248248

249249
$sync.send($server.localport);
@@ -252,7 +252,6 @@ sub do-test(Block $b-server, Block $b-client) {
252252
}
253253
);
254254

255-
$thread.run;
256255
my $client = IO::Socket::INET.new(:host<localhost>, :port($sync.receive));
257256
$b-client($client);
258257
$thread.finish;

0 commit comments

Comments
 (0)