Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pyParallelRunAndWrite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tetras-libre
pyParallelRunAndWrite
Commits
2efbe83f
Commit
2efbe83f
authored
6 years ago
by
David Rouquet
Browse files
Options
Downloads
Patches
Plain Diff
Update Readme.md with correct python code
parent
fc435ee2
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Readme.md
+6
-2
6 additions, 2 deletions
Readme.md
with
6 additions
and
2 deletions
Readme.md
+
6
−
2
View file @
2efbe83f
...
...
@@ -10,11 +10,15 @@ Do a parallel map(func, tasks) with numProc processes
## How to use
```
python
import
os
from
time
import
sleep
from
random
import
randint
from
pyParallelRunAndWrite
import
parallelRunAndWrite
as
prw
def
testFunc
(
arg
):
ret
=
str
(
arg
)
+
str
(
os
.
getpid
())
sleep
(
randint
(
2
,
5
))
return
ret
def
test
():
parallelRunAndWrite
(
testFunc
,
range
(
5
),
"
testplop
"
,
numProc
=
2
,
errFileName
=
"
errors
"
)
prw
.
parallelRunAndWrite
(
testFunc
,
range
(
5
),
"
testplop
"
,
numProc
=
2
,
errFileName
=
"
errors
"
)
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment