# This file was automatically generated by SWIG (http://www.swig.org).
-# Version 1.3.39
+# Version 2.0.4
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
step immediate => 1,
connect => sub { .. };
+In some case, you want to execute some code when the step finish, it can
+be done by defining a finalize code in define_steps:
+
+ my $steps = define_steps
+ cb_ref => \$finished_cb,
+ finalize => sub { .. };
+
=head2 JOINING ASYNCHRONOUS "THREADS"
With slow operations, it is often useful to perform multiple operations
sub define_steps (@) {
my (%params) = @_;
my $cb_ref = $params{'cb_ref'};
+ my $finalize = $params{'finalize'};
my %steps;
croak "cb_ref is undefined" unless defined $cb_ref;
$$cb_ref = sub {
%steps = ();
$current_steps = undef;
+ $finalize->() if defined($finalize);
goto $orig_cb;
};