chronos/debugutils

Search:
Group by:
Source   Edit  

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: [], forbids: [].}

Dump all pending FutureT objects.

This list will contain:

  1. FutureT objects with FutureState.Pending state (this Futures are not yet finished).
  2. FutureT objects with FutureState.Finished/Cancelled/Failed state which callbacks are scheduled, but not yet fully processed.
Source   Edit  
proc pendingFuturesCount(filter: set[FutureState]): uint {....raises: [], tags: [],
    forbids: [].}

Returns number of pending FutureT 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

NestedPoll, closeSocket, ENOSR, EHOSTUNREACH, EHOSTDOWN, ECONNRESET, EDQUOT, fail, ECANCELED, EMLINK, milliseconds, asyncTimer, +=, $, Second, internalRaiseIfError, getSrcLocation, FutureError, fromNow, weeks, ESPIPE, withTimeout, LocationKind, id, <=, FutureBase, FutureCompletedError, ENOEXEC, ESHUTDOWN, fail, EREMOTEIO, Day, waitFor, complete, internalInitFutureBase, EPROTONOSUPPORT, cancelAndWait, addTimer, Moment, ECOMM, EPROTOTYPE, AsyncExceptionError, FuturePendingError, milliseconds, ENOENT, millis, removeTimer, or, FutureFlag, ENOTCONN, EBUSY, init, ENOTUNIQ, <=, days, +=, race, ==, cancelSoon, AsyncTimeoutError, setThreadDispatcher, EEXIST, ENOLINK, newInternalRaisesFuture, idleAsync, internalRaiseIfError, SomeIntegerI64, ENOMEM, ENOKEY, +, removeWriter2, ENOMSG, EKEYEXPIRED, Week, cancelSoon, awaitne, EAFNOSUPPORT, EWOULDBLOCK, [], EREMOTE, finished, AsyncCallback, EHWPOISON, epochSeconds, newDispatcher, EPERM, microseconds, internalFail, weeks, Finished, ENOTSOCK, cancelCallback=, ETOOMANYREFS, $, EISCONN, callSoon, ESOCKTNOSUPPORT, setGlobalDispatcher, EXDEV, EBADF, EKEYREVOKED, allFinished, TrackerBase, hours, InternalAsyncCallback, EBFONT, ENETDOWN, EACCES, ELOOP, InfiniteDuration, ETIMEDOUT, EINVAL, value, EBADFD, Future, completed, PDispatcher, ESRCH, EL2NSYNC, Finished, low, await, ESTRPIPE, -=, EALREADY, getAsyncTimestamp, EXFULL, Hour, EIDRM, removeReader2, secs, getThreadDispatcher, futureContinue, isZero, ENOANO, EADV, CallbackFunc, contains, cancelAndWait, $, ENFILE, waitFor, high, Microsecond, ENOPKG, ELIBBAD, EOWNERDEAD, handle, ERANGE, done, ENONET, completed, callSoon, toString, cancelSoon, EMSGSIZE, EBADMSG, EILSEQ, ENOPROTOOPT, EDESTADDRREQ, allFutures, -, complete, FutureState, EBADR, nanos, location, FutureDefect, EDOTDOT, one, EKEYREJECTED, <, race, error, one, CancelledError, nanoseconds, EISDIR, sleepAsync, Nanosecond, EOVERFLOW, FutureSeq, cancelAndWait, micros, -, ESRMNT, ENOTEMPTY, EPROTO, TimerCallback, microseconds, error, epochNanoSeconds, ENOTRECOVERABLE, wait, EDOM, value, hours, AsyncError, EBADRQC, ENODEV, FutureStr, addTimer, ENOBUFS, ECHRNG, ENOTDIR, EUNATCH, cancelAndSchedule, failed, nanoseconds, ERESTART, *, ETXTBSY, newFutureStr, EMFILE, LocFinishIndex, withTimeout, addTimer, race, EUSERS, ENOTBLK, Minute, DispatcherHandle, EISNAM, ELIBACC, ENAVAIL, init, race, EUCLEAN, ENOTTY, +, cancelSoon, completed, minutes, cancel, FutureFlags, getGlobalDispatcher, ELIBEXEC, stepsAsync, micros, wait, cancelAndWait, EINPROGRESS, EPFNOSUPPORT, E2BIG, -=, ENOMEDIUM, secs, read, waitFor, EL3HLT, unregisterAndCloseFd, EBADSLT, InternalRaisesFuture, -, <, ENETRESET, fastEpochTime, ENXIO, join, EPIPE, ThreadCallbackFunc, allFutures, race, wait, now, read, asyncSpawn, removeCallback, EAGAIN, raiseOsDefect, EADDRNOTAVAIL, read, removeCallback, TrackerCounter, async, addCallback, init, async, ZeroDuration, EREMCHG, EFAULT, addCallback, seconds, noCancel, low, AsyncFD, ECHILD, Raising, init, ECONNABORTED, state, wait, removeTimer, LocCreateIndex, addReader2, ETIME, ENOLCK, EBADE, EDEADLK, asyncCheck, Duration, ELNRNG, ENOCSI, millis, EMEDIUMTYPE, readError, sleepAsync, isInfinite, callback=, ENETUNREACH, InternalFutureBase, ENOSPC, ENOSYS, ELIBSCN, EIO, EROFS, seconds, ELIBMAX, SrcLoc, ==, ==, div, init, EL2HLT, EOPNOTSUPP, tryCancel, poll, flags, clearTimer, register2, LocCompleteIndex, days, ENOSTR, EADDRINUSE, one, ENAMETOOLONG, EMULTIHOP, ESTALE, await, ENODATA, EFBIG, +, minutes, ERFKILL, cancelled, toException, or, EDEADLOCK, allFutures, MaxEventsCount, wait, read, raiseAsDefect, Millisecond, setTimer, unregister2, failed, waitFor, newFutureSeq, callback=, orImpl, ECONNREFUSED, high, ENOTNAM, nanos, addWriter2, removeTimer, EINTR, join, closeHandle, EL3RST, readError, *, newFuture