forked from celery/celery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No longer depends on multiprocessing backport, only billiard
- Loading branch information
Showing
17 changed files
with
70 additions
and
127 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
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
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
try: | ||
import billiard | ||
from billiard import util | ||
from billiard import pool | ||
current_process = billiard.current_process | ||
register_after_fork = util.register_after_fork | ||
freeze_support = billiard.freeze_support | ||
Process = billiard.Process | ||
cpu_count = billiard.cpu_count | ||
Pool = pool.Pool | ||
RUN = pool.RUN | ||
except ImportError: | ||
try: | ||
import multiprocessing | ||
from multiprocessing import util | ||
from multiprocessing import pool | ||
current_process = multiprocessing.current_process | ||
register_after_fork = util.register_after_fork | ||
freeze_support = multiprocessing.freeze_support | ||
Process = multiprocessing.Process | ||
cpu_count = multiprocessing.cpu_count | ||
Pool = pool.Pool | ||
RUN = pool.RUN | ||
except ImportError: | ||
current_process = None | ||
util = None | ||
register_after_fork = lambda *a, **kw: None | ||
freeze_support = lambda: True | ||
Process = None | ||
cpu_count = lambda: 2 | ||
Pool = None | ||
RUN = 1 | ||
|
||
|
||
def get_process_name(): | ||
if current_process is not None: | ||
return current_process().name | ||
|
||
def forking_enable(enabled): | ||
try: | ||
from billiard import forking_enable | ||
except ImportError: | ||
try: | ||
from multiprocessing import forking_enable | ||
except ImportError: | ||
return | ||
forking_enable(enabled) |
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,4 +1,3 @@ | ||
multiprocessing==2.6.2.1 | ||
importlib | ||
ordereddict | ||
simplejson | ||
simplejson |
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