Removed Utils.nogc as it is unused

This commit is contained in:
Thomas Nagy 2016-03-05 11:45:16 +01:00
parent b95db27d05
commit 333aec0b96
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
2 changed files with 1 additions and 27 deletions

View File

@ -16,4 +16,5 @@ NEW IN WAF 1.9
* Enabled pre-forked builds by default
* Modified the build scheduler to enable a consistent progress bar
* Reduced the memory footprint of Task objects
* Removed Utils.nogc

View File

@ -715,14 +715,6 @@ if is_win32:
shutil.copystat(src, dst)
setattr(shutil, 'copy2', copy2)
if os.name == 'java':
# Jython cannot disable the gc but they can enable it ... wtf?
try:
gc.disable()
gc.enable()
except NotImplementedError:
gc.disable = gc.enable
def read_la_file(path):
"""
Read property files, used by msvc.py
@ -740,25 +732,6 @@ def read_la_file(path):
pass
return dc
def nogc(fun):
"""
Decorator: let a function disable the garbage collector during its execution.
It is used in the build context when storing/loading the build cache file (pickle)
:param fun: function to execute
:type fun: function
:return: the return value of the function executed
"""
def f(*k, **kw):
try:
gc.disable()
ret = fun(*k, **kw)
finally:
gc.enable()
return ret
f.__doc__ = fun.__doc__
return f
def run_once(fun):
"""
Decorator: let a function cache its results, use like this::