++ed by:
RODRIGO

1 PAUSE user

Sam Vilain
and 1 contributors

NAME

threads::tbb::concurrent::item - lazy deep copy slot

SYNOPSIS

  use threads::tbb;

  #my $scalar :concurrent;  # TODO
  tie my $scalar, "threads::tbb::concurrent::item";

  # this works:
  $scalar = "foo";
  my $item = $scalar;  # safe

  # never:
  $array[0]->mutate;

DESCRIPTION

The concurrent item is a single slot which is not duplicated when passed between threads. It is a way to access the lazy deep copy mechanism used by threads::tbb::concurrent implementations, free of the container.

It does not correspond to any formal TBB API, and should not be considered thread-safe when used in isolation.

This API should be considered EXPERIMENTAL. It probably needs altering to be safe, at the very minimum by cloning objects on the way in.

SEE ALSO

threads::tbb::concurrent, threads::tbb