File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -238,22 +238,19 @@ timeout = 10 * time.Millisecond
238238
239239// Normal cases
240240// Result would be 10
241- actual, _ = Maybe .Just (Ask. New ( 1 , nil ).AskOnce (actorRoot)).ToInt ()
241+ actual, _ = Maybe .Just (AskNewGenerics ( 1 ).AskOnce (actorRoot, nil )).ToInt ()
242242// Ask with Timeout
243243// Result would be 20
244- actual, _ = Maybe .Just (Ask. New ( 2 , &timeout ).AskOnce (actorRoot)).ToInt ()
244+ actual, _ = Maybe .Just (AskNewGenerics ( 2 ).AskOnce (actorRoot, &timeout )).ToInt ()
245245// Ask channel
246246// Result would be 30
247- ch , timer := Ask . New ( 3 , &timeout ).AskChannel (actorRoot)
247+ ch := AskNewGenerics ( 3 ).AskChannel (actorRoot)
248248actual, _ = Maybe .Just (<- *ch).ToInt ()
249249close (*ch)
250- if timer != nil {
251- timer.Stop ()
252- }
253250
254251// Timeout cases
255252// Result would be 0 (zero value, timeout)
256- actual, _ = Maybe .Just (Ask. New (-1 , &timeout ).AskOnce (actorRoot)).ToInt ()
253+ actual, _ = Maybe .Just (AskNewGenerics (-1 ).AskOnce (actorRoot, &timeout )).ToInt ()
257254```
258255
259256## Compose
You can’t perform that action at this time.
0 commit comments