Skip to content

Commit 9dec787

Browse files
committed
Fix doctests
1 parent 02c8a95 commit 9dec787

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/utils.jl

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -530,24 +530,12 @@ the trailing edge, pass `trailing=true`.
530530
```jldoctest
531531
julia> a = Flux.throttle(() -> println("Flux"), 2);
532532
533-
julia> a()
534-
Flux
535-
536-
julia> for i = 1:4 # sleeps for 1 second -> the function can be called in alternate iterations
533+
julia> for i = 1:4 # a called in alternate iterations
537534
a()
538-
sleep(1.5)
535+
sleep(1)
539536
end
540537
Flux
541538
Flux
542-
543-
julia> for i = 1:4 # sleeps for 2 second -> the function can be called in the next iteration
544-
a()
545-
sleep(2)
546-
end
547-
Flux
548-
Flux
549-
Flux
550-
Flux
551539
```
552540
"""
553541
function throttle(f, timeout; leading=true, trailing=false)

0 commit comments

Comments
 (0)