enable "--threads:on" for tests (#75)

* enable "--threads:on" for tests

* disable Chronicles colours on Windows

* delete forLoopMacros-related config
This commit is contained in:
Ștefan Talpalaru 2019-02-05 18:48:34 +01:00 committed by Jacek Sieka
parent e5d152c6d6
commit 20e02d5615
3 changed files with 10 additions and 7 deletions

View File

@ -55,6 +55,7 @@ p2pProtocol GossipSub(version = 1,
p.state.sentMessages.incl msgId p.state.sentMessages.incl msgId
asyncCheck p.emit(topic, msgId, msg) asyncCheck p.emit(topic, msgId, msg)
{.gcsafe.}:
let handler = peer.networkState.topicSubscribers.getOrDefault(topic) let handler = peer.networkState.topicSubscribers.getOrDefault(topic)
if handler != nil: if handler != nil:
await handler(msg) await handler(msg)

View File

@ -1,5 +1,5 @@
# https://github.com/nim-lang/Nim/issues/8691#issuecomment-414662209 # https://github.com/nim-lang/Nim/issues/8294#issuecomment-454556051
# Doesn't work unfortunately @if windows:
@if nimHasForLoopMacros: -d:"chronicles_colors=NoColors"
--experimental:forLoopMacros
@end @end

2
tests/nim.cfg Normal file
View File

@ -0,0 +1,2 @@
--threads:on