Consts
AllFutureStates = {FutureState.Pending, FutureState.Cancelled, FutureState.Completed, FutureState.Failed}
- Source Edit
OnlyCompleted = {FutureState.Completed}
- Source Edit
OnlyPending = {FutureState.Pending}
- Source Edit
WithoutCompleted = {FutureState.Pending, FutureState.Cancelled, FutureState.Failed}
- Source Edit
Procs
proc dumpPendingFutures(filter = AllFutureStates): string {....raises: [], tags: [].}
-
Dump all pending Future[T] objects.
This list will contain:
- Future[T] objects with FutureState.Pending state (this Futures are not yet finished).
- Future[T] objects with FutureState.Finished/Cancelled/Failed state which callbacks are scheduled, but not yet fully processed.
proc pendingFuturesCount(filter: set[FutureState]): uint {....raises: [], tags: [].}
-
Returns number of pending Future[T] objects which satisfy the filter condition.
If filter is equal to AllFutureStates Operation's complexity is O(1), otherwise operation's complexity is O(n).
Source Edit
Exports
-
setThreadDispatcher, closeSocket, ENOSR, EHOSTUNREACH, EHOSTDOWN, ECONNRESET, EDQUOT, fail, ECANCELED, EMLINK, FuturePendingError, milliseconds, <=, +=, $, asyncTimer, internalRaiseIfError, getSrcLocation, FutureError, fromNow, weeks, ESPIPE, withTimeout, LocationKind, id, <=, FutureCompletedError, ENOEXEC, ESHUTDOWN, fail, EREMOTEIO, toString, Day, waitFor, complete, internalInitFutureBase, EPROTONOSUPPORT, Nanosecond, cancelAndWait, addTimer, Moment, ECOMM, EPROTOTYPE, AsyncExceptionError, milliseconds, getTrackerCounter, ENOENT, millis, removeTimer, ==, FutureFlag, ENOTCONN, EBUSY, init, ENOTUNIQ, days, +=, race, or, EKEYREVOKED, AsyncTimeoutError, EUCLEAN, Second, EEXIST, ENOLINK, newInternalRaisesFuture, idleAsync, internalRaiseIfError, SomeIntegerI64, ENOMEM, ENOKEY, +, removeWriter2, ENOMSG, [], trackCounter, EKEYEXPIRED, Week, isCounterLeaked, awaitne, EAFNOSUPPORT, EWOULDBLOCK, EREMOTE, finished, untrackCounter, AsyncCallback, EHWPOISON, epochSeconds, newDispatcher, EPERM, microseconds, trackerCounters, internalFail, weeks, Finished, cancelCallback=, ETOOMANYREFS, $, EISCONN, callSoon, ESOCKTNOSUPPORT, setGlobalDispatcher, EXDEV, EBADF, cancelSoon, allFinished, TrackerBase, hours, InternalAsyncCallback, EBFONT, ENETDOWN, EACCES, ELOOP, InfiniteDuration, ETIMEDOUT, EINVAL, value, EBADFD, Future, completed, PDispatcher, ESRCH, EL2NSYNC, Finished, low, await, ESTRPIPE, -=, ==, ENOTSOCK, getAsyncTimestamp, EXFULL, Hour, EIDRM, removeReader2, secs, getThreadDispatcher, futureContinue, isZero, ENOANO, EADV, CallbackFunc, contains, cancelAndWait, $, ENFILE, FutureBase, waitFor, high, Microsecond, ENOPKG, ELIBBAD, callSoon, EOWNERDEAD, ERANGE, done, or, ENONET, completed, callSoon, cancelSoon, EMSGSIZE, EALREADY, EBADMSG, EILSEQ, ENOPROTOOPT, EDESTADDRREQ, allFutures, -, complete, FutureState, EBADR, nanos, location, FutureDefect, EDOTDOT, one, EKEYREJECTED, <, race, error, one, CancelledError, nanoseconds, EISDIR, sleepAsync, EOVERFLOW, FutureSeq, cancelAndWait, micros, -, ESRMNT, ENOTEMPTY, race, TimerCallback, microseconds, error, ENOTRECOVERABLE, wait, callIdle, EDOM, value, hours, AsyncError, EBADRQC, ENODEV, FutureStr, addTimer, ENOBUFS, ECHRNG, ENOTDIR, EUNATCH, cancelAndSchedule, failed, nanoseconds, ERESTART, *, ETXTBSY, getTracker, newFutureStr, EMFILE, LocFinishIndex, withTimeout, addTimer, race, EUSERS, ENOTBLK, EPROTO, EISNAM, ELIBACC, ENAVAIL, init, race, internalCallTick, ==, ENOTTY, +, cancelSoon, completed, minutes, cancel, FutureFlags, getGlobalDispatcher, ELIBEXEC, stepsAsync, micros, wait, cancelAndWait, EINPROGRESS, EPFNOSUPPORT, E2BIG, -=, runForever, ENOMEDIUM, secs, read, waitFor, EL3HLT, unregisterAndCloseFd, EBADSLT, -, <, ENETRESET, fastEpochTime, ENXIO, join, EPIPE, allFutures, Minute, wait, now, read, asyncSpawn, removeCallback, EAGAIN, raiseOsDefect, trackerCounterKeys, EADDRNOTAVAIL, read, removeCallback, TrackerCounter, async, addCallback, init, async, ZeroDuration, EREMCHG, EFAULT, addCallback, seconds, noCancel, low, AsyncFD, ECHILD, Raising, init, ECONNABORTED, state, wait, callIdle, removeTimer, LocCreateIndex, addReader2, ETIME, ENOLCK, EDEADLK, asyncCheck, Duration, ELNRNG, ENOCSI, millis, EBADE, EMEDIUMTYPE, readError, sleepAsync, isInfinite, callback=, ENETUNREACH, InternalFutureBase, callIdle, ENOSPC, ENOSYS, ELIBSCN, EIO, EROFS, seconds, ELIBMAX, SrcLoc, div, init, EL2HLT, EOPNOTSUPP, tryCancel, poll, flags, clearTimer, register2, LocCompleteIndex, days, ENOSTR, EADDRINUSE, one, ENAMETOOLONG, EMULTIHOP, epochNanoSeconds, ESTALE, await, ENODATA, EFBIG, +, minutes, ERFKILL, cancelled, toException, InternalRaisesFuture, EDEADLOCK, allFutures, MaxEventsCount, wait, read, raiseAsDefect, Millisecond, setTimer, cancelSoon, unregister2, failed, waitFor, newFutureSeq, addTracker, callback=, orImpl, ECONNREFUSED, high, ENOTNAM, nanos, addWriter2, removeTimer, internalCallTick, EINTR, join, closeHandle, EL3RST, readError, *, newFuture, internalCallTick