line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PLS::Server::Request::CancelRequest; |
2
|
|
|
|
|
|
|
|
3
|
9
|
|
|
9
|
|
54
|
use strict; |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
218
|
|
4
|
9
|
|
|
9
|
|
37
|
use warnings; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
314
|
|
5
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
46
|
use parent 'PLS::Server::Request'; |
|
9
|
|
|
|
|
18
|
|
|
9
|
|
|
|
|
36
|
|
7
|
|
|
|
|
|
|
|
8
|
9
|
|
|
9
|
|
445
|
use Scalar::Util qw(blessed); |
|
9
|
|
|
|
|
19
|
|
|
9
|
|
|
|
|
1429
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
PLS::Server::Request::CancelRequest |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
This is a notification message from the client to the server requesting |
17
|
|
|
|
|
|
|
that a request be cancelled. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub service |
22
|
|
|
|
|
|
|
{ |
23
|
1
|
|
|
1
|
0
|
7
|
my ($self, $server) = @_; |
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
14
|
my $id = $self->{params}{id}; |
26
|
1
|
50
|
|
|
|
9
|
return unless (exists $server->{running_futures}{$id}); |
27
|
1
|
|
|
|
|
3
|
my $request_to_cancel = $server->{running_futures}{$id}; |
28
|
|
|
|
|
|
|
|
29
|
1
|
50
|
33
|
|
|
21
|
return unless (blessed($request_to_cancel) and $request_to_cancel->isa('Future')); |
30
|
1
|
|
|
|
|
27
|
$request_to_cancel->cancel(); |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
265
|
delete $server->{running_futures}{$id}; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
7
|
return; |
35
|
|
|
|
|
|
|
} ## end sub service |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |