mirror of
https://github.com/fverdugo/XM_40017.git
synced 2025-11-09 00:34:24 +01:00
Merge pull request #44 from Andy-Tatman/main
This commit is contained in:
commit
1e46702781
@ -725,9 +725,9 @@
|
|||||||
"id": "b8b411f1",
|
"id": "b8b411f1",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"### Remote channels are not iterable\n",
|
"### Remote channels are also iterable\n",
|
||||||
"\n",
|
"\n",
|
||||||
"One main difference with respect to conventional channels is that remote channels cannot be iterated. Let's repeat the example above."
|
"As with conventional channels, remote channels can be iterated. Let's repeat the example above."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -761,7 +761,7 @@
|
|||||||
"id": "4bb35283",
|
"id": "4bb35283",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"Now, try to iterate over the channel in a for loop. It will result in an error since channels are not iterable."
|
"Now, try to iterate over the channel in a for loop."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -781,7 +781,7 @@
|
|||||||
"id": "8eaea2fa",
|
"id": "8eaea2fa",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"source": [
|
"source": [
|
||||||
"If we want to take values form a remote channel and stop automatically when the channel is closed, we can combine a while loop and a try-catch statement. This works since `take!` raises an error if the channel is closed, which will execute the `catch` block and breaks the loop."
|
"As an alternative method (or if you are using an older version of Julia): if we want to take values form a remote channel and stop automatically when the channel is closed, we can combine a while loop and a try-catch statement. This works since `take!` raises an error if the channel is closed, which will execute the `catch` block and breaks the loop."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user