Skip to content

Commit

Permalink
multiprocessing.Pool
Browse files Browse the repository at this point in the history
  • Loading branch information
WOnder93 committed Oct 18, 2019
1 parent 878eb1e commit a33acec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/sepolicy/sepolicy.py
Expand Up @@ -25,7 +25,7 @@
import sys
import selinux
import sepolicy
from concurrent.futures import ProcessPoolExecutor
from multiprocessing import Pool
from sepolicy import get_os_version, get_conditionals, get_conditionals_format_text
import argparse
PROGNAME = "policycoreutils"
Expand Down Expand Up @@ -346,9 +346,11 @@ def manpage(args):
else:
test_domains = args.domain

with ProcessPoolExecutor() as e:
for domain in test_domains:
e.submit(manpage_work, domain, path, args.root, args.source_files, args.web)
p = Pool()
for domain in test_domains:
p.apply_async(manpage_work, [domain, path, args.root, args.source_files, args.web])
p.close()
p.join()

if args.web:
HTMLManPages(manpage_roles, manpage_domains, path, args.os)
Expand Down

0 comments on commit a33acec

Please sign in to comment.