bump chronos (#5039)
* separate futures import / Defect cleanups * unittest2 fix to allow `stackTrace` as a symbol name generally
This commit is contained in:
parent
effe8b7f90
commit
8db87a0cfc
|
@ -343,7 +343,7 @@ proc trackEngineApiRequest(connection: ELConnection,
|
|||
request: FutureBase, requestName: string,
|
||||
startTime: Moment, deadline: Future[void],
|
||||
failureAllowed = false) =
|
||||
request.addCallback do (udata: pointer) {.gcsafe, raises: [Defect].}:
|
||||
request.addCallback do (udata: pointer) {.gcsafe, raises: [].}:
|
||||
# TODO `udata` is nil here. How come?
|
||||
# This forces us to create a GC cycle between the Future and the closure
|
||||
if request.completed:
|
||||
|
@ -353,7 +353,7 @@ proc trackEngineApiRequest(connection: ELConnection,
|
|||
|
||||
connection.setWorkingState()
|
||||
|
||||
deadline.addCallback do (udata: pointer) {.gcsafe, raises: [Defect].}:
|
||||
deadline.addCallback do (udata: pointer) {.gcsafe, raises: [].}:
|
||||
if not request.finished:
|
||||
request.cancel()
|
||||
engine_api_timeouts.inc(1, [connection.engineUrl.url, requestName])
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
# beacon_chain
|
||||
# Copyright (c) 2023 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
# TODO: These should be added to the Chronos's asyncfutures2 module
|
||||
# See https://github.com/status-im/nim-chronos/pull/339
|
||||
|
||||
|
@ -34,8 +41,8 @@ proc firstCompletedFuture*(futs: varargs[FutureBase]): Future[FutureBase] =
|
|||
|
||||
var failedFutures = 0
|
||||
|
||||
var cb: proc(udata: pointer) {.gcsafe, raises: [Defect].}
|
||||
cb = proc(udata: pointer) {.gcsafe, raises: [Defect].} =
|
||||
var cb: proc(udata: pointer) {.gcsafe, raises: [].}
|
||||
cb = proc(udata: pointer) {.gcsafe, raises: [].} =
|
||||
if not(retFuture.finished()):
|
||||
var res: FutureBase
|
||||
var rfut = cast[FutureBase](udata)
|
||||
|
|
|
@ -349,7 +349,7 @@ proc deletePeer*[A, B](pool: PeerPool[A, B], peer: A, force = false): bool =
|
|||
|
||||
proc addPeerImpl[A, B](pool: PeerPool[A, B], peer: A, peerKey: B,
|
||||
peerType: PeerType) =
|
||||
proc onPeerClosed(udata: pointer) {.gcsafe, raises: [Defect].} =
|
||||
proc onPeerClosed(udata: pointer) {.gcsafe, raises: [].} =
|
||||
discard pool.deletePeer(peer)
|
||||
|
||||
let item = PeerItem[A](data: peer, peerType: peerType,
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 2ef34c7339c5d8e59f212d7af72a06e0d3e8327c
|
||||
Subproject commit 0035f4fa6692e85756aa192b4df84c21d3cacacb
|
|
@ -1 +1 @@
|
|||
Subproject commit 5ed05c90fb54f5e1c41004f91fa57260bdfb6133
|
||||
Subproject commit b178f47527074964f76c395ad0dfc81cf118f379
|
Loading…
Reference in New Issue