Skip to content

Commit 4b4e772

Browse files
author
pevnak
committed
fixing formatting of lecture 10
1 parent 0cc8b9a commit 4b4e772

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/src/lectures/lecture_10/lecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,14 @@ with which we obtain the comparable speed to the `pmap` approach.
351351

352352
::: info
353353

354-
*"`remote_do` vs `remote_call`"*
354+
* `remote_do` vs `remote_call` *
355355
Instead of `@spawnat` (`remote_call`) we can also use `remote_do` as foreach`(p -> remote_do(juliaset_channel_worker, p, instructions, results), workers)`, which executes the function `juliaset_channel_worker` at worker `p` with parameters `instructions` and `results` but does not return `Future` handle to receive the future results.
356356

357357
:::
358358

359359
::: info
360360

361-
*"`Channel` and `RemoteChannel`""*
361+
* `Channel` and `RemoteChannel` *
362362
`AbstractChannel` has to implement the interface `put!`, `take!`, `fetch`, `isready` and `wait`, i.e. it should behave like a queue. `Channel` is an implementation if an `AbstractChannel` that facilitates a communication within a single process (for the purpose of multi-threadding and task switching). Channel can be easily created by `Channel{T}(capacity)`, which can be infinite. The storage of a channel can be seen in `data` field, but a direct access will of course break all guarantees like atomicity of `take!` and `put!`. For communication between proccesses, the `<:AbstractChannel` has to be wrapped in `RemoteChannel`. The constructor for `RemoteChannel(f::Function, pid::Integer=myid())` has a first argument a function (without arguments) which constructs the `Channel` (or something like that) on the remote machine identified by `pid` and returns the `RemoteChannel`. The storage thus resides on the machine specified by `pid` and the handle provided by the `RemoteChannel` can be freely passed to any process. (For curious, `ProcessGroup` `Distributed.PGRP` contains an information about channels on machines.)
363363

364364
:::

0 commit comments

Comments
 (0)