Fix some compilation warnings and expose tracker names. (#376)
* Fix asyncsync compilation warnings. * Fix tracker names should be public.
This commit is contained in:
parent
ab5a8c2e0f
commit
e05d2f8e96
|
@ -154,6 +154,9 @@ proc wakeUpFirst(lock: AsyncLock): bool {.inline.} =
|
|||
res = true
|
||||
break
|
||||
if i > 0:
|
||||
when compiles(lock.waiters.delete(0 .. (i - 1))):
|
||||
lock.waiters.delete(0 .. (i - 1))
|
||||
else:
|
||||
lock.waiters.delete(0, i - 1)
|
||||
res
|
||||
|
||||
|
@ -272,6 +275,9 @@ proc wakeupNext(waiters: var seq[Future[void]]) {.inline.} =
|
|||
break
|
||||
|
||||
if i > 0:
|
||||
when compiles(waiters.delete(0 .. (i - 1))):
|
||||
waiters.delete(0 .. (i - 1))
|
||||
else:
|
||||
waiters.delete(0, i - 1)
|
||||
|
||||
proc full*[T](aq: AsyncQueue[T]): bool {.inline.} =
|
||||
|
|
|
@ -61,7 +61,7 @@ type
|
|||
closed*: int64
|
||||
|
||||
const
|
||||
DgramTransportTrackerName = "datagram.transport"
|
||||
DgramTransportTrackerName* = "datagram.transport"
|
||||
|
||||
proc remoteAddress*(transp: DatagramTransport): TransportAddress {.
|
||||
raises: [Defect, TransportOsError].} =
|
||||
|
|
|
@ -71,8 +71,8 @@ type
|
|||
gcsafe, raises: [Defect].}
|
||||
|
||||
const
|
||||
StreamTransportTrackerName = "stream.transport"
|
||||
StreamServerTrackerName = "stream.server"
|
||||
StreamTransportTrackerName* = "stream.transport"
|
||||
StreamServerTrackerName* = "stream.server"
|
||||
|
||||
when defined(windows):
|
||||
type
|
||||
|
|
Loading…
Reference in New Issue