@@ -76,22 +76,11 @@ template Finished*(T: type FutureState): FutureState {.
76
76
deprecated: " Use FutureState.Completed instead" .} =
77
77
FutureState.Completed
78
78
79
- proc newFutureImpl[T](loc: ptr SrcLoc): Future[T] =
80
- let fut = Future[T]()
81
- internalInitFutureBase(fut, loc, FutureState.Pending, {})
82
- fut
83
-
84
79
proc newFutureImpl[T](loc: ptr SrcLoc, flags: FutureFlags): Future[T] =
85
80
let fut = Future[T]()
86
81
internalInitFutureBase(fut, loc, FutureState.Pending, flags)
87
82
fut
88
83
89
- proc newInternalRaisesFutureImpl[T, E](
90
- loc: ptr SrcLoc): InternalRaisesFuture[T, E] =
91
- let fut = InternalRaisesFuture[T, E]()
92
- internalInitFutureBase(fut, loc, FutureState.Pending, {})
93
- fut
94
-
95
84
proc newInternalRaisesFutureImpl[T, E](
96
85
loc: ptr SrcLoc, flags: FutureFlags): InternalRaisesFuture[T, E] =
97
86
let fut = InternalRaisesFuture[T, E]()
@@ -125,7 +114,7 @@ template newInternalRaisesFuture*[T, E](fromProc: static[string] = ""): auto =
125
114
##
126
115
## Specifying ``fromProc``, which is a string specifying the name of the proc
127
116
## that this future belongs to, is a good habit as it helps with debugging.
128
- newInternalRaisesFutureImpl[T, E](getSrcLocation(fromProc))
117
+ newInternalRaisesFutureImpl[T, E](getSrcLocation(fromProc), {} )
129
118
130
119
template newFutureSeq*[A, B](fromProc: static [string ] = ""): FutureSeq[A, B] {.deprecated.} =
131
120
## Create a new future which can hold/preserve GC sequence until future will
@@ -1697,7 +1686,7 @@ proc wait*[T](fut: Future[T], deadline: SomeFuture): Future[T] =
1697
1686
# We set `OwnCancelSchedule` flag, because we going to cancel `retFuture`
1698
1687
# manually at proper time.
1699
1688
waitUntilImpl(fut, retFuture, deadline)
1700
-
1689
+
1701
1690
proc join*(future: FutureBase): Future[void ] {.
1702
1691
async: (raw: true, raises: [CancelledError]).} =
1703
1692
## Returns a future which will complete once future ``future`` completes.
0 commit comments