reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Weimer <>
Subject Re: REEF Services
Date Tue, 02 Feb 2016 18:08:59 GMT
On 2016-02-02 10:02, Julia Wang (QIUHE) wrote:
> If we need one service per context, then it should be tight to 
> context. If we only need singleton in entire evaluator, it should be 
> tight to evaluator. If any service is at task level, then it should 
> be tight to task I guess.

That's what the Context stacking is for, and it covers the three cases
you mentioned:

  * Singleton in the Evaluator: Put the service into the root context,
    which is the first context created on an Evaluator. All other
    contexts inherit its objects.
  * Per-Context: Just put it into that Context.
  * Per-Task: Launch a Context just for that Task.


View raw message