package Callback; use 5.010000; use threads; use threads::shared; use strict; use warnings; require Exporter; use AutoLoader qw(AUTOLOAD); our @ISA = qw(Exporter); our $VERSION = '0.01'; require XSLoader; XSLoader::load('Callback', $VERSION); sub new { my $invocant = shift; my $callback_ref = shift; $invocant = ref $invocant if ref $invocant; registCallback($callback_ref); my $self = &share({}); return bless $self, $invocant; } sub run { my $self = shift; my $param = shift; runCallback($param); } 1;