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 @@ -243,22 +243,19 @@ timeout = 10 * time.Millisecond
243243
244244// Normal cases
245245// Result would be 10
246- actual, _ = Maybe .Just (Ask. New ( 1 , nil ).AskOnce (actorRoot)).ToInt ()
246+ actual, _ = Maybe .Just (AskNewGenerics ( 1 ).AskOnce (actorRoot, nil )).ToInt ()
247247// Ask with Timeout
248248// Result would be 20
249- actual, _ = Maybe .Just (Ask. New ( 2 , &timeout ).AskOnce (actorRoot)).ToInt ()
249+ actual, _ = Maybe .Just (AskNewGenerics ( 2 ).AskOnce (actorRoot, &timeout )).ToInt ()
250250// Ask channel
251251// Result would be 30
252- ch , timer := Ask . New ( 3 , &timeout ).AskChannel (actorRoot)
252+ ch := AskNewGenerics ( 3 ).AskChannel (actorRoot)
253253actual, _ = Maybe .Just (<- *ch).ToInt ()
254254close (*ch)
255- if timer != nil {
256- timer.Stop ()
257- }
258255
259256// Timeout cases
260257// Result would be 0 (zero value, timeout)
261- actual, _ = Maybe .Just (Ask. New (-1 , &timeout ).AskOnce (actorRoot)).ToInt ()
258+ actual, _ = Maybe .Just (AskNewGenerics (-1 ).AskOnce (actorRoot, &timeout )).ToInt ()
262259```
263260
264261## Compose
You can’t perform that action at this time.
0 commit comments