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,7 +154,10 @@ proc wakeUpFirst(lock: AsyncLock): bool {.inline.} =
|
|||
res = true
|
||||
break
|
||||
if i > 0:
|
||||
lock.waiters.delete(0, i - 1)
|
||||
when compiles(lock.waiters.delete(0 .. (i - 1))):
|
||||
lock.waiters.delete(0 .. (i - 1))
|
||||
else:
|
||||
lock.waiters.delete(0, i - 1)
|
||||
res
|
||||
|
||||
proc checkAll(lock: AsyncLock): bool {.inline.} =
|
||||
|
@ -272,7 +275,10 @@ proc wakeupNext(waiters: var seq[Future[void]]) {.inline.} =
|
|||
break
|
||||
|
||||
if i > 0:
|
||||
waiters.delete(0, i - 1)
|
||||
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.} =
|
||||
## Return ``true`` if there are ``maxsize`` items in the queue.
|
||||
|
|
|
@ -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