Procs
proc coop(c: Cont): Cont {....raises: [], tags: [TimeEffect].}
- Pass control to other pending continuations in the dispatcher before continuing; effectively a cooperative yield. Source Edit
proc dismiss(c: Cont): Cont {....raises: [], tags: [].}
- Discard the current continuation. Source Edit
proc fork(c: Cont): Cont {....raises: [], tags: [TimeEffect].}
- Duplicate the current continuation. Source Edit
proc iowait(c: Cont; file: int | SocketHandle; events: set[Event]): Cont
- Continue upon any of events on the given file-descriptor or SocketHandle. Source Edit
proc jield() {....deprecated: "renamed to coop()", cpsMustJump, cpsMagicCall, ...raises: [], tags: [].}
- Source Edit
proc jield(c: Cont): Cont {....deprecated: "renamed to coop()", raises: [], tags: [TimeEffect].}
- Source Edit
proc len(eq: EventQueue): int {....raises: [], tags: [].}
- The number of pending continuations. Source Edit
proc newSemaphore(): Semaphore {....raises: [], tags: [TimeEffect].}
- Create a new Semaphore. Source Edit
proc noop(c: Cont): Cont {....raises: [], tags: [].}
- A primitive that merely sheds scope. Source Edit
proc poll() {....raises: [Exception, KeyError, OSError], tags: [RootEffect, TimeEffect].}
- See what continuations need running and run them. Source Edit
proc run(interval: Duration = DurationZero) {. ...raises: [Exception, KeyError, OSError], tags: [TimeEffect, RootEffect].}
- The dispatcher runs with a maximal polling interval; an interval of DurationZero causes the dispatcher to return when the queue is empty. Source Edit
proc signal(s: var Semaphore) {....raises: [], tags: [TimeEffect].}
- Signal the given Semaphore s, causing the first waiting continuation to be queued for execution in the dispatcher; control remains in the calling procedure. Source Edit
proc signalAll(s: var Semaphore) {....raises: [], tags: [TimeEffect].}
- Signal the given Semaphore s, causing all waiting continuations to be queued for execution in the dispatcher; control remains in the calling procedure. Source Edit
proc sleep(c: Cont; interval: Duration): Cont {....raises: [ValueError], tags: [TimeEffect].}
- Sleep for interval before continuing. Source Edit
proc sleep(c: Cont; ms: int): Cont {....raises: [ValueError], tags: [TimeEffect].}
- Sleep for ms milliseconds before continuing. Source Edit
proc sleep(c: Cont; secs: float): Cont {....raises: [ValueError], tags: [TimeEffect].}
- Sleep for secs seconds before continuing. Source Edit
proc spawn(c: Cont) {....raises: [], tags: [TimeEffect].}
- Queue the supplied continuation c; control remains in the calling procedure. Source Edit
proc stop() {....raises: [], tags: [TimeEffect].}
- Tell the dispatcher to stop, discarding all pending continuations. Source Edit
proc trampoline(c: Cont) {....raises: [Exception], tags: [RootEffect].}
- Run the supplied continuation until it is complete. Source Edit