From 8f05b3412568ec66a72bcae221613630d561aac0 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Sun, 10 Feb 2019 19:52:13 +0000 Subject: Add note on channel usage with spawn (#10627) [ci skip] --- lib/system/channels.nim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/system/channels.nim') diff --git a/lib/system/channels.nim b/lib/system/channels.nim index 14d3a3005..057ea2843 100644 --- a/lib/system/channels.nim +++ b/lib/system/channels.nim @@ -7,12 +7,17 @@ # distribution, for details about the copyright. # -## Channel support for threads. **Note**: This is part of the system module. -## Do not import it directly. To activate thread support you need to compile -## with the ``--threads:on`` command line switch. +## Channel support for threads. +## +## **Note**: This is part of the system module. Do not import it directly. +## To activate thread support compile with the ``--threads:on`` command line switch. +## +## **Note:** Channels are designed for the ``Thread`` type. They are unstable when +## used with ``spawn`` ## ## **Note:** The current implementation of message passing does ## not work with cyclic data structures. +## ## **Note:** Channels cannot be passed between threads. Use globals or pass ## them by `ptr`. -- cgit 1.4.1-2-gfad0