mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-08 15:52:26 +01:00
Changed note in once-per-object section to indicate that in v6.6 support is native through once key.
Author:halw Date:2010-05-27T14:43:38.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@623 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -163,7 +163,7 @@ So in this simple form, <code>attached x</code> can be used instead of <code>x /
|
||||
|
||||
There is a code pattern for functions that exists in some Eiffel software to effect "once-per-object / lazy evaluation".
|
||||
|
||||
{{note|This is different from an Eiffel <code>once</code> routine, which is "once-per-thread" or "once-per-process" depending upon how it is configured. }}
|
||||
{{note|As of EiffelStudio version 6.6, the use of the attached syntax for effecting "once per object" is no longer necessary. V6.6 includes explicit support for <code>once</code> routines which can be adjusted by a [[ET: Other Mechanisms#Adjusting once semantics with "once keys"|once key]] to specify once per object.}}
|
||||
|
||||
This "once-per-object" code pattern employs a cached value for some object which is not exported. When it is applied, the "once-per-object" function checks the attachment status of the cached value. If the cached value is void, then it is created and assigned to <code>Result</code>. If the cached value was found already to exist, then it is just assigned to <code>Result</code>.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user