Liking cljdoc? Tell your friends :D

fr.jeremyschoffen.mbt.alpha.utils.threading-utils


*recording*clj

source

branch!cljmacro

(branch! f!)
(branch! v f!)

Similar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]]. f! is expected to be a symbol that resolves to a function. The name of the branch will then be (resolve f!).

Similar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]].
`f!` is expected to be a symbol that resolves to a function. The name of the branch
will then be `(resolve f!)`.
sourceraw docstring

branch-named!clj

(branch-named! f! n)
(branch-named! v f! n)

In a threaded operation, will execute f! to the side and return v as it got it.

Wraps f! with [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-branch*]].

For the middleware used, the operation is named n.

In a threaded operation, will execute `f!` to the side
and return `v` as it got it.

Wraps `f! with` [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-branch*]].

For the middleware used, the operation is named `n`.
sourceraw docstring

current-nameclj

(current-name ctxt)
source

current-stackclj

(current-stack ctxt)
source

do-side-effect!cljmacro

(do-side-effect! f!)
(do-side-effect! v f!)

Simmilar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch!]] but using the [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] middelware.

 Simmilar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch!]] but using the
[[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] middelware.
sourceraw docstring

do-side-effect-named!clj

(do-side-effect-named! f! n)
(do-side-effect-named! v f! n)

Same as [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]] except for the middleware used to wrap f!.

Here [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] is used.

Same as [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]] except for the middleware used to wrap
`f!`.

Here [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] is used.
sourceraw docstring

dry-run?clj

(dry-run? ctxt)
source

format-recordingclj

(format-recording recorded-side-effects)

Transform a record of side effects into a tree that models the succession of events better.

Transform a record of side effects into a tree that models the succession of events better.
sourceraw docstring

make-dry-runclj

(make-dry-run ctxt)

Specify to function using ctxt to work in dry run mode by altering the context's metadata

Specify to function using `ctxt` to work in dry run mode by altering the context's metadata
sourceraw docstring

pop-name-stackclj

(pop-name-stack ctxt)
source

push-name-stackclj

(push-name-stack ctxt name)
source

rankclj

(rank recorded-se)
source

recordcljmacro

(record & body)

Capture recording of side effects wrapped with [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-record]].

Capture recording of side effects wrapped with
[[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-record]].
sourceraw docstring

relevant-keysclj

(relevant-keys name)
source

wrap-branch*clj

(wrap-branch* f n)

Wraps a function with the following middleware:

  • wrap-generic-logging
  • wrap-record
  • wrap-name
Wraps a function with the following middleware:
- wrap-generic-logging
- wrap-record
- wrap-name
sourceraw docstring

wrap-dry-runclj

(wrap-dry-run f!)
source

wrap-errorclj

(wrap-error f!)

Middleware used to wrap side effects in a way that it augments their exceptions with some data.

Middleware used to wrap side effects in a way that it augments their
exceptions with some data.
sourceraw docstring

wrap-generic-loggingclj

(wrap-generic-logging f!)

Middleware used to provide some logging.

Middleware used to provide some logging.
sourceraw docstring

wrap-nameclj

(wrap-name f! name)

Middleware pushing and popping a name onto a stack situated in the metadata of the ctxt. When threading it allows the following of where in the called stack we are. The names

Middleware pushing and popping a name onto a stack situated in the metadata of
the `ctxt`. When threading it allows the following of where in the called stack we are.
The names 
sourceraw docstring

wrap-recordclj

(wrap-record f!)

Middleware used to record side effects and theirs results. It uses the dynamic var [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/recording]].

To record, this var must be bound to (atom []) surrounding the code being recorded.

Middleware used to record side effects and theirs results. It uses the dynamic var
[[fr.jeremyschoffen.mbt.alpha.default.threading-utils/*recording*]].

To record, this var must be bound to `(atom [])` surrounding the
code being recorded.
sourceraw docstring

wrap-side-effect*clj

(wrap-side-effect* f n)

Wraps a function understood to be a side-effect from the core api with the following middleware:

  • wrap-dry-run
  • wrap-generic-logging
  • wrap-error
  • wrap-record
  • wrap-name
Wraps a function understood to be a side-effect from the core api with the following middleware:
- wrap-dry-run
- wrap-generic-logging
- wrap-error
- wrap-record
- wrap-name
sourceraw docstring

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

× close