$self->receive_free($id);
}
-sub receive_class_call {
- my ($self, $future_id, $class, @rest) = @_;
- my $future = $self->_id_to_remote_object($future_id);
- $future->{method} = 'call_discard_free';
- eval { use_module($class) }
- or do { $future->fail("Error loading ${class}: $@"); return };
- $self->_invoke($future, $class, @rest);
-}
-
sub _invoke {
my ($self, $future, $local, $ctx, $method, @args) = @_;
if ($method =~ /^start::/) {
ref($_) eq 'HASH' and $_ = [ %$_ ] for $args->{args};
$self->_set_id(
await_future(
- $self->connection->send(
- class_call => $args->{class}, 0,
+ $self->connection->send_class_call(
+ 0, $args->{class},
$args->{constructor}||'new', @{$args->{args}||[]}
)
)->{remote}->disarm_free->id