Udostępnij za pośrednictwem


single_assignment::single_assignment Constructor

Constructs a single_assignment messaging block.

single_assignment();
single_assignment(
   filter_method const& _Filter
);
single_assignment(
   Scheduler& _PScheduler
);
single_assignment(
   Scheduler& _PScheduler,
   filter_method const& _Filter
);
single_assignment(
   ScheduleGroup& _PScheduleGroup
);
single_assignment(
   ScheduleGroup& _PScheduleGroup,
   filter_method const& _Filter
);

Parameters

  • _Filter
    A filter function which determines whether offered messages should be accepted.

  • _PScheduler
    The Scheduler object within which the propagation task for the single_assignment messaging block is scheduled.

  • _PScheduleGroup
    The ScheduleGroup object within which the propagation task for the single_assignment messaging block is scheduled. The Scheduler object used is implied by the schedule group.

Remarks

The runtime uses the default scheduler if you do not specify the _PScheduler or _PScheduleGroup parameters.

The type filter_method is a functor with signature bool (_Type const &) which is invoked by this single_assignment messaging block to determine whether or not it should accept an offered message.

Requirements

Header: agents.h

Namespace: Concurrency

See Also

Reference

single_assignment Class

Scheduler Class

ScheduleGroup Class