use strict;
use Config;
use Test::More;
use Hash::MultiValue;

BEGIN {
    plan skip_all => "perl interpreter is not compiled with ithreads"
      unless $Config{useithreads};

    require threads;
}

plan tests => 2;

my $h = Hash::MultiValue->new(foo => 'bar');
my @exp = ('bar');

is_deeply([$h->get_all('foo')], \@exp, 'got expected results');

my @got = threads->create(sub { 
    $h->get_all('foo');
})->join;

is_deeply(\@got, \@exp, 'got expected results in cloned interpreter');

