Skip to content

Commit 90ea93f

Browse files
committed
Make Future notify convert for non-exception
1 parent dbedfdb commit 90ea93f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "LibAwsCommon"
22
uuid = "c6e421ba-b5f8-4792-a1c4-42948de3ed9d"
3-
version = "1.3.1"
3+
version = "1.3.2"
44

55
[deps]
66
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"

src/LibAwsCommon.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ end
154154
capture(e::Exception) = CapturedException(e, Base.backtrace())
155155

156156
Base.notify(f::Future{Nothing}) = notify(f, nothing)
157-
function Base.notify(f::Future{T}, x::Union{Exception, T}) where {T}
157+
function Base.notify(f::Future{T}, x) where {T}
158158
lock(f.notify) # acquire barrier
159159
try
160160
if f.set == Int8(0)
@@ -163,7 +163,7 @@ function Base.notify(f::Future{T}, x::Union{Exception, T}) where {T}
163163
f.result = x
164164
else
165165
set = Int8(1)
166-
f.result = x
166+
f.result = convert(T, x)
167167
end
168168
@atomic :release f.set = set
169169
notify(f.notify)

0 commit comments

Comments
 (0)