Remove redundant file

This commit is contained in:
Raycho Mukelov 2023-09-15 21:07:54 +03:00
parent 0a1d81993a
commit 7009ac21fd
1 changed files with 0 additions and 30 deletions

View File

@ -1,30 +0,0 @@
# nim-raft
# Copyright (c) 2023 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
# at your option.
# This file may not be copied, modified, or distributed except according to
# those terms.
import asyncdispatch, httpclient
proc nonAsyncHttp() =
var client = newHttpClient()
echo "Non async started"
for i in 0 .. 30:
let resp = client.get("http://example.com")
echo resp.status
echo "Non async finished"
proc asyncHttp() {.async.} =
var client = newAsyncHttpClient()
echo "Async started"
for i in 0 .. 30:
let resp = await client.get("http://example.com")
echo resp.status
echo "Async finished"
waitFor asyncHttp()
nonAsyncHttp()