Consistently use Channel instead of TChannel
This commit is contained in:
parent
6d6cf78229
commit
7177e0058b
7 changed files with 8 additions and 8 deletions
|
|
@ -12,7 +12,7 @@ type
|
|||
|
||||
var
|
||||
producer, consumer: Thread[void]
|
||||
chan: TChannel[TMsg]
|
||||
chan: Channel[TMsg]
|
||||
printedLines = 0
|
||||
|
||||
proc consume() {.thread.} =
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue