Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fixed the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hivert committed Feb 3, 2016
1 parent aa8280f commit f984165
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/sage/parallel/map_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,16 +568,14 @@ class ActiveTaskCounterDarwin(object):
computation process. The goal is mostly to circumvent the non POSIX
compliant implementation of Semaphore under Darwin's OSes.
###########################
# The MacOSX Semaphore bug:
###########################
# This raises a big problem on MacOSX since they do not correctly
# implement POSIX's semaphore semantic. Indeed, on this system,
# acquire may fail and return False not only because the semaphore is
# equal to zero but also BECAUSE SOMEONE ELSE IS TRYING TO ACQUIRE at
# the same time. This renders the usage of Semaphore impossible on
# MacOSX so that on this system we use a synchronized integer.
.. note:: The MacOSX Semaphore bug
This raises a big problem on MacOSX since they do not correctly
implement POSIX's semaphore semantic. Indeed, on this system, acquire
may fail and return False not only because the semaphore is equal to
zero but also BECAUSE SOMEONE ELSE IS TRYING TO ACQUIRE at the same
time. This renders the usage of Semaphore impossible on MacOSX so that
on this system we use a synchronized integer.
"""
def __init__(self, task_number, shutdown):
r"""
Expand Down Expand Up @@ -676,7 +674,7 @@ def abort(self):

ActiveTaskCounter = (ActiveTaskCounterDarwin if sys.platform == 'darwin'
else ActiveTaskCounterOther)
ActiveTaskCounter = ActiveTaskCounterDarwin # to debug DARWIN's implem
# ActiveTaskCounter = ActiveTaskCounterDarwin # to debug DARWIN's implem



Expand Down

0 comments on commit f984165

Please sign in to comment.