This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
133 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Shared memory | ||
|
||
An example for illustrating that the memory can be shared between workers in the same core. | ||
An example to illustrate how to shared memory between workers in the same core. | ||
|
||
```bash | ||
$ DEBUG=farm-cli farm -n 1 -w 5 -d 0 examples/basic --your-file-flags foo=bar | ||
$ DEBUG=farm farm -n 1 -w 5 -d 0 examples/basic --your-file-flags foo=bar | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Basic | ||
|
||
```bash | ||
$ DEBUG=farm-cli farm --cores 1 --workers 5 --delay 0 examples/factorial | ||
$ DEBUG=farm farm --cores 1 --workers 5 --delay 0 examples/factorial | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# Basic | ||
|
||
```bash | ||
$ DEBUG=farm-cli farm --cores 1 --workers 5 --delay 0 examples/fibonacci | ||
``` | ||
# Fibonacci | ||
|
||
This example use many workers in the same core for calculate fibonacci values. | ||
|
||
```bash | ||
$ DEBUG=farm farm --cores 1 --workers 5 --delay 0 examples/fibonacci --n=20 | ||
``` | ||
|
||
Notes you need to specify the number of values to get using `--n`. | ||
|
||
Additionally, you can pass `--memo` for use a memoize implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Basic | ||
|
||
```bash | ||
$ DEBUG=farm-cli farm -w 2 -n 5 -d 0 examples/load-config --your-file-flags foo=bar | ||
$ DEBUG=farm farm -w 2 -n 5 -d 0 examples/load-config --your-file-flags foo=bar | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters