1
2random(n) random(n)
3
4
5
7 random - Create and manipulate randomizer channels
8
10 package require Tcl
11
12 package require memchan
13
14 random
15
16
18 random creates a random channel which absorbs everything written into
19 it and uses it as a seed for a random number generator. This
20 generator is used to create a random sequence of bytes when
21 reading from the channel. It is not possible to seek the chan‐
22 nel.
23
25 Memory channels created by random provide one additional option to set
26 or query.
27
28 -delay ?milliseconds?
29 A random channel is always writable and readable. This means
30 that all fileevent-handlers will fire continuously. To avoid
31 starvation of other event sources the events raised by this
32 channel type have a configurable delay. This option is set in
33 milliseconds and defaults to 5.
34
36 memchan, fifo, fifo2, null, zero
37
39 random, in-memory channel, channel, i/o
40
42 Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
43
44
45
46Memory channels 2.2 random(n)