Liking cljdoc? Tell your friends :D
Mostly clj/s.
Exceptions indicated.

jtk-dvlp.async


<cb!clj/smacro

(<cb! ?exp)
(<cb! ?exp options)

Like <! but converts callback based expression / function ?exp into channel before via cb->c.

Given option error-selector can be used to extract an error out of exp result. Extracted error will be thrown as ExceptionInfo. No error extraction by default.

Given option value-selector can be used to extract the value out of exp result if no error has been extracted before. Extracts first callback arg by default.

Like `<!` but converts callback based expression / function `?exp` into channel
before via `cb->c`.

Given option `error-selector` can be used to extract an error out of exp result.
Extracted error will be thrown as `ExceptionInfo`. No error extraction by default.

Given option `value-selector` can be used to extract the value out of exp result
if no error has been extracted before. Extracts first callback arg by default.
sourceraw docstring

<e!clj/smacro

(<e! ?exp)

Like <! but tests taken val instance of ExceptionInfo, if so throws it.

Usage in combination with go*.

Like `<!` but tests taken val instance of `ExceptionInfo`, if so throws it.

Usage in combination with `go*`.
sourceraw docstring

?mapclj/s

(?map f chs)

Like map but carries thrownExceptionInfo` as result.

Usage in combination with <e!.

Like `map but carries thrown `ExceptionInfo` as result.

Usage in combination with `<e!`.
source (clj)source (cljs)raw docstring

c->pcljs

(c->p c)

Creates a promise and resolves it with the val of channel c taken by <!, excepted val is an instance of ExceptionInfo rejects the promise. Closes the channel after took val.

Creates a promise and resolves it with the val of channel `c`
taken by `<!`, excepted val is an instance of `ExceptionInfo` rejects the
promise. Closes the channel after took val.
sourceraw docstring

cb->cclj/smacro

(cb->c [fun & forms])

Converts callback driven function into channel. Use callback symbol within expression exp forms (any level) to mark callback position in argumentlist. If no callback symbol is found assumes callback needs to be appended to argumentlist.

Converts callback driven function into channel. Use `callback` symbol within
expression `exp` forms (any level) to mark callback position in argumentlist. If no
callback symbol is found assumes callback needs to be appended to argumentlist.
sourceraw docstring

go*clj/smacro

(go* & body)

Like go but carries thrown ExceptionInfo as result.

Usage in combination with <e!, <p! and <cb!.

Like `go` but carries thrown `ExceptionInfo` as result.

Usage in combination with `<e!`, `<p!` and `<cb!`.
sourceraw docstring

safeclj/smacro

(safe & body)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close