§5.2.(b) Imperative activation
Each team class implicitly provides methods from the predefined interface
org.objectteams.ITeam
(super interface of all team classes) to control team
activation disregarding the block structure of the program. The methods activate()
and deactivate()
are used to activate and deactivate a team instance for
the current thread.
If a team should be de-/activated for another thread this can be done by the methods
activate(Thread aThread)
and deactivate(Thread aThread)
.
In order to achieve global activation for all threads the predefined constant
org.objectteams.Team.ALL_THREADS
is passed to these methods (e.g.
activate(Team.ALL_THREADS)
).
Note, that this methods make no guarantees with respect to exceptions.