Hi
I have an immutable object inherited from non-akka code with a number of 
lazy vals declared within in - which cause some modest amount of 
processing. They are not sufficiently time-consuming to warrant a separate 
actor/thread to calculate them but I'd rather not have to change them to 
defs - the client code elsewhere assumes that they'll only be calculated 
once - or vals, since the results may never be used.

Lazy val has always seemed to me like a good idea for this sort of thing. 
But what are the implications if used in an object within Akka. I don't 
care about wasted time in the extremely unlikely event that 2 actors 
inspect the lazy val at the "same" time and both cause a calculation. But 
is the assignment of a real value to the lazy val thread-safe? 
Tim

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to