88 retry the operation by coercing to higher generality" |
88 retry the operation by coercing to higher generality" |
89 |
89 |
90 ^ aQDouble retry:#+ coercing:self |
90 ^ aQDouble retry:#+ coercing:self |
91 |
91 |
92 "Created: / 13-06-2017 / 08:54:27 / cg" |
92 "Created: / 13-06-2017 / 08:54:27 / cg" |
|
93 ! ! |
|
94 |
|
95 !Block methodsFor:'Compatibility-Dolphin'! |
|
96 |
|
97 deferredValue |
|
98 "Dolphin compatibility method - do not use in new code. |
|
99 Dolphin's alias for futureValue" |
|
100 |
|
101 ^ Future new block:self |
|
102 |
|
103 "Modified: / 04-10-2011 / 14:56:27 / cg" |
|
104 ! ! |
|
105 |
|
106 !Block methodsFor:'Compatibility-Dolphin'! |
|
107 |
|
108 deferredValueAt:priority |
|
109 "Dolphin compatibility method - do not use in new code. |
|
110 Dolphin's alias for futureValue" |
|
111 |
|
112 ^ Future new |
|
113 priority:priority block:self |
|
114 |
|
115 "Created: / 04-10-2011 / 14:55:56 / cg" |
|
116 ! ! |
|
117 |
|
118 !Block methodsFor:'parallel evaluation'! |
|
119 |
|
120 futureValue |
|
121 "Fork a synchronised evaluation of myself. |
|
122 Starts the evaluation in parallel now, but synchronizes |
|
123 any access to wait until the result is computed." |
|
124 |
|
125 ^ Future new block:self |
|
126 ! ! |
|
127 |
|
128 !Block methodsFor:'parallel evaluation'! |
|
129 |
|
130 futureValue:aValue |
|
131 "Fork a synchronised evaluation of myself. |
|
132 Starts the evaluation in parallel now, but synchronizes |
|
133 any access to wait until the result is computed." |
|
134 |
|
135 ^ Future new block:self value:aValue |
|
136 ! ! |
|
137 |
|
138 !Block methodsFor:'parallel evaluation'! |
|
139 |
|
140 futureValue:aValue value:anotherValue |
|
141 "Fork a synchronised evaluation of myself. |
|
142 Starts the evaluation in parallel now, but synchronizes |
|
143 any access to wait until the result is computed." |
|
144 |
|
145 ^ Future new |
|
146 block:self |
|
147 value:aValue |
|
148 value:anotherValue |
|
149 ! ! |
|
150 |
|
151 !Block methodsFor:'parallel evaluation'! |
|
152 |
|
153 futureValue:aValue value:anotherValue value:bValue |
|
154 "Fork a synchronised evaluation of myself. |
|
155 Starts the evaluation in parallel now, but synchronizes |
|
156 any access to wait until the result is computed." |
|
157 |
|
158 ^ Future new |
|
159 block:self |
|
160 value:aValue |
|
161 value:anotherValue |
|
162 value:bValue |
|
163 ! ! |
|
164 |
|
165 !Block methodsFor:'parallel evaluation'! |
|
166 |
|
167 futureValueWithArguments:anArray |
|
168 "Fork a synchronised evaluation of myself. |
|
169 Starts the evaluation in parallel now, but synchronizes |
|
170 any access to wait until the result is computed." |
|
171 |
|
172 ^ Future new |
|
173 block:self |
|
174 valueWithArguments:anArray |
|
175 |
|
176 "Modified (format): / 04-10-2011 / 14:55:40 / cg" |
|
177 ! ! |
|
178 |
|
179 !Block methodsFor:'parallel evaluation'! |
|
180 |
|
181 lazyValue |
|
182 "Fork a synchronised evaluation of myself. Only starts |
|
183 the evaluation when the result is requested." |
|
184 |
|
185 ^ Lazy new block:self |
|
186 ! ! |
|
187 |
|
188 !Block methodsFor:'parallel evaluation'! |
|
189 |
|
190 lazyValue:aValue |
|
191 "Fork a synchronised evaluation of myself. Only starts |
|
192 the evaluation when the result is requested." |
|
193 |
|
194 ^ Lazy new block:self value:aValue |
|
195 ! ! |
|
196 |
|
197 !Block methodsFor:'parallel evaluation'! |
|
198 |
|
199 lazyValue:aValue value:anotherValue |
|
200 "Fork a synchronised evaluation of myself. Only starts |
|
201 the evaluation when the result is requested." |
|
202 |
|
203 ^ Lazy new |
|
204 block:self |
|
205 value:aValue |
|
206 value:anotherValue |
|
207 ! ! |
|
208 |
|
209 !Block methodsFor:'parallel evaluation'! |
|
210 |
|
211 lazyValue:aValue value:anotherValue value:bValue |
|
212 "Fork a synchronised evaluation of myself. Only starts |
|
213 the evaluation when the result is requested." |
|
214 |
|
215 ^ Lazy new |
|
216 block:self |
|
217 value:aValue |
|
218 value:anotherValue |
|
219 value:bValue |
|
220 ! ! |
|
221 |
|
222 !Block methodsFor:'parallel evaluation'! |
|
223 |
|
224 lazyValueWithArguments:anArray |
|
225 "Fork a synchronised evaluation of myself. Only starts |
|
226 the evaluation when the result is requested." |
|
227 |
|
228 ^ Lazy new block:self valueWithArguments:anArray |
|
229 ! ! |
|
230 |
|
231 !Block methodsFor:'process creation'! |
|
232 |
|
233 promise |
|
234 "create a promise on the receiver. The promise will evaluate the |
|
235 receiver and promise to return the value with the #value message. |
|
236 The evaluation will be performed as a separate process. |
|
237 Asking the promise for its value will either block the asking process |
|
238 (if the evaluation has not yet been finished) or return the value |
|
239 immediately." |
|
240 |
|
241 ^ Promise value:self |
|
242 |
|
243 " |
|
244 |p| |
|
245 |
|
246 p := [1000 factorial] promise. |
|
247 'do something else ...'. |
|
248 p value |
|
249 " |
|
250 ! ! |
|
251 |
|
252 !Block methodsFor:'process creation'! |
|
253 |
|
254 promiseAt:prio |
|
255 "create a promise on the receiver. The promise will evaluate the |
|
256 receiver and promise to return the value with the #value message. |
|
257 The evaluation will be performed as a separate process running at prio. |
|
258 Asking the promise for its value will either block the asking process |
|
259 (if the evaluation has not yet been finished) or return the value |
|
260 immediately." |
|
261 |
|
262 ^ Promise value:self priority:prio |
93 ! ! |
263 ! ! |
94 |
264 |
95 !CharacterArray methodsFor:'matching - phonetic'! |
265 !CharacterArray methodsFor:'matching - phonetic'! |
96 |
266 |
97 asKoelnerPhoneticCode |
267 asKoelnerPhoneticCode |