From e56e9c71e1d7339d43e5c9889332d05071581d76 Mon Sep 17 00:00:00 2001 From: Ivan Yonchovski Date: Tue, 16 Nov 2021 21:11:05 +0200 Subject: [PATCH] Few minor improvements - Remove the reference to non-existing `createPipeline` from the docs. - Added check whether async_backend is set when `asynctools_adapters `is imported. Without this change the compile error is very unclear (Future not defined). --- README.md | 6 +++--- faststreams/asynctools_adapters.nim | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d3b2401..3bd8026 100644 --- a/README.md +++ b/README.md @@ -517,9 +517,9 @@ type PipelineResultProc*[T] = proc (i: InputStream): T Please note that `stream.getOutput` is an example of such a function. -Pipelnes can be created with the `cretePipeline` API or executed in place with -`executePipeline`. If the first input source is async, then the whole pipeline -with be executing asynchronously which can result in a much lower memory usage. +Pipelnes executed in place with `executePipeline` API. If the first input source is +async, then the whole pipeline with be executing asynchronously which can result +in a much lower memory usage. The pipeline transformation steps are usually employing the `fsMultiSync` pragma to make them usable in both synchronous and asynchronous scenarios. diff --git a/faststreams/asynctools_adapters.nim b/faststreams/asynctools_adapters.nim index e40a4fe..b123d5a 100644 --- a/faststreams/asynctools_adapters.nim +++ b/faststreams/asynctools_adapters.nim @@ -1,6 +1,9 @@ import asynctools/asyncpipe, - inputs, outputs, buffers, multisync + inputs, outputs, buffers, multisync, async_backend + +when (not fsAsyncSupport): + {.fatal: "`-d:async_backend` has be to set".} export inputs, outputs, asyncpipe, fsMultiSync