From 7177e0058b96a3f737d954ea3b146f4d21469fdf Mon Sep 17 00:00:00 2001 From: def Date: Thu, 25 Feb 2016 04:04:45 +0100 Subject: [PATCH] Consistently use Channel instead of TChannel --- compiler/semtypinst.nim | 2 +- lib/pure/collections/queues.nim | 2 +- tests/parallel/tarray_of_channels.nim | 2 +- tests/parallel/tgc_unsafe.nim | 2 +- tests/parallel/tgc_unsafe2.nim | 2 +- tests/threads/threadex.nim | 2 +- tests/threads/ttryrecv.nim | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 20b60a88d7..a7f28feec8 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -60,7 +60,7 @@ proc searchInstTypes*(key: PType): PType = if inst.id == key.id: return inst if inst.sons.len < key.sons.len: # XXX: This happens for prematurely cached - # types such as TChannel[empty]. Why? + # types such as Channel[empty]. Why? # See the notes for PActor in handleGenericInvocation return block matchType: diff --git a/lib/pure/collections/queues.nim b/lib/pure/collections/queues.nim index c35a2dc295..b9bf33bff0 100644 --- a/lib/pure/collections/queues.nim +++ b/lib/pure/collections/queues.nim @@ -9,7 +9,7 @@ ## Implementation of a `queue`:idx:. The underlying implementation uses a ``seq``. ## Note: For inter thread communication use -## a `TChannel `_ instead. +## a `Channel `_ instead. import math diff --git a/tests/parallel/tarray_of_channels.nim b/tests/parallel/tarray_of_channels.nim index 11b5234017..90ae8369c9 100644 --- a/tests/parallel/tarray_of_channels.nim +++ b/tests/parallel/tarray_of_channels.nim @@ -1,7 +1,7 @@ # bug #2257 import threadpool -type StringChannel = TChannel[string] +type StringChannel = Channel[string] var channels: array[1..3, StringChannel] type diff --git a/tests/parallel/tgc_unsafe.nim b/tests/parallel/tgc_unsafe.nim index 6548bbec81..a4d96cd735 100644 --- a/tests/parallel/tgc_unsafe.nim +++ b/tests/parallel/tgc_unsafe.nim @@ -6,7 +6,7 @@ discard """ # bug #2257 import threadpool -type StringChannel = TChannel[string] +type StringChannel = Channel[string] var channels: array[1..3, StringChannel] type diff --git a/tests/parallel/tgc_unsafe2.nim b/tests/parallel/tgc_unsafe2.nim index ec4605fe94..4a5f36f6d1 100644 --- a/tests/parallel/tgc_unsafe2.nim +++ b/tests/parallel/tgc_unsafe2.nim @@ -9,7 +9,7 @@ tgc_unsafe2.nim(28, 5) Error: 'consumer' is not GC-safe as it calls 'track' import threadpool -type StringChannel = TChannel[string] +type StringChannel = Channel[string] var channels: array[1..3, StringChannel] type diff --git a/tests/threads/threadex.nim b/tests/threads/threadex.nim index 00d0992a5e..442e80189e 100644 --- a/tests/threads/threadex.nim +++ b/tests/threads/threadex.nim @@ -12,7 +12,7 @@ type var producer, consumer: Thread[void] - chan: TChannel[TMsg] + chan: Channel[TMsg] printedLines = 0 proc consume() {.thread.} = diff --git a/tests/threads/ttryrecv.nim b/tests/threads/ttryrecv.nim index fc1f213210..be79fadaef 100644 --- a/tests/threads/ttryrecv.nim +++ b/tests/threads/ttryrecv.nim @@ -7,7 +7,7 @@ discard """ from math import random from os import sleep -type PComm = ptr TChannel[int] +type PComm = ptr Channel[int] proc doAction(outC: PComm) {.thread.} = for i in 0.. <5: @@ -16,7 +16,7 @@ proc doAction(outC: PComm) {.thread.} = var thr: Thread[PComm] - chan: TChannel[int] + chan: Channel[int] open(chan) createThread[PComm](thr, doAction, addr(chan))