kore-doc

The kore documentation found under https://docs.kore.io/
Commits | Files | Refs | README | git clone https://git.kore.io/kore-doc.git

commit 2b64280ef28f03bc24e971ad54683c2f5faaa440
parent f532491835c3f45fe5a9801a5d79ecbcfe0aec79
Author: Joris Vink <joris@coders.se>
Date:   Fri,  3 May 2019 15:40:27 +0200

add kore.suspend()

Diffstat:
api/python.md | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/api/python.md b/api/python.md @@ -44,6 +44,7 @@ this worker process. * [tracer](#tracer) * [task\_create](#taskcreate) * [gather](#gather) + * [suspend](#suspend) * [register\_database](#registerdatabase) * [websocket\_broadcast](#websocketbroadcast) @@ -366,6 +367,37 @@ async def request(req): --- +# suspend {#suspend} + +### Synopsis + +```python +kore.suspend(milliseconds) +``` + +### Description + +Suspends the current coroutine for the specified amount of milliseconds. + +| Parameter | Description | +| --- | --- | +| milliseconds | Number of milliseconds to suspend execution for. | + +### Returns + +Nothing + +### Example + +```python +import kore + +async def request(req): + await kore.suspend(1000) + req.response(200, b'') +``` + +--- # websocket\_broadcast {#websocketbroadcast}