[h5py] 320/455: Eradicate PHIL

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit 82799c56faab94f850ce838be9329221c8ac4323
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Tue Nov 24 01:41:24 2009 +0000

    Eradicate PHIL
---
 h5py/h5.pxd       |  11 ---
 h5py/h5.pyx       |  92 +++++-----------------
 h5py/h5a.pyx      |  43 +++++------
 h5py/h5d.pyx      |  29 ++++---
 h5py/h5e.pyx      |   5 +-
 h5py/h5f.pyx      |  33 ++++----
 h5py/h5g.pyx      |  37 +++++----
 h5py/h5i.pyx      |  13 ++--
 h5py/h5l_body.pyx |  17 ++---
 h5py/h5o_body.pyx |  17 ++---
 h5py/h5p.pyx      |  19 ++---
 h5py/h5p_dcid.pxi |  44 +++++------
 h5py/h5p_faid.pxi |  28 +++----
 h5py/h5p_fcid.pxi |  10 +--
 h5py/h5p_laid.pxi |   8 +-
 h5py/h5p_lcid.pxi |   4 +-
 h5py/h5r.pyx      |  13 +---
 h5py/h5s.pyx      |  61 +++++++--------
 h5py/h5t.pyx      | 222 ++++++++++++++++++++++++++----------------------------
 h5py/h5z.pyx      |   7 +-
 h5py/utils.pyx    |   3 -
 21 files changed, 301 insertions(+), 415 deletions(-)

diff --git a/h5py/h5.pxd b/h5py/h5.pxd
index 89379d7..ec07a7b 100644
--- a/h5py/h5.pxd
+++ b/h5py/h5.pxd
@@ -12,17 +12,6 @@
 
 include "defs.pxd"
 
-cdef class PHIL:
-
-    cdef object lock
-
-    cpdef bint __enter__(self) except -1
-    cpdef bint __exit__(self, a, b, c) except -1
-    cpdef bint acquire(self, int blocking=*) except -1
-    cpdef bint release(self) except -1
-
-cpdef PHIL get_phil()
-
 cdef class H5PYConfig:
 
     cdef object _r_name
diff --git a/h5py/h5.pyx b/h5py/h5.pyx
index cea307a..9b12176 100644
--- a/h5py/h5.pyx
+++ b/h5py/h5.pyx
@@ -191,48 +191,6 @@ def loglevel(lev):
     ELSE:
         pass
 
-cdef class PHIL:
-
-    """
-        Warning:  This is an internal h5py object.  Don't use it in your code.
-
-        The Primary HDF5 Interface Lock (PHIL) is a global reentrant lock
-        which manages access to the library.  HDF5 is not guaranteed to 
-        be thread-safe, and certain callbacks in h5py can execute arbitrary
-        threaded Python code, defeating the normal GIL-based protection for
-        extension modules.  Therefore, in all routines acquire this lock first.
-    """
-
-    def __init__(self):
-        self.lock = threading.RLock()
-    cpdef bint __enter__(self) except -1:
-        self.lock.acquire()
-        return 0
-    cpdef bint __exit__(self,a,b,c) except -1:
-        self.lock.release()
-        return 0
-    cpdef bint acquire(self, int blocking=1) except -1:
-        register_thread()
-        cdef bint rval = self.lock.acquire(blocking)
-        return rval
-    cpdef bint release(self) except -1:
-        self.lock.release()
-        return 0   
-
-cdef PHIL phil = PHIL()
-
-cpdef PHIL get_phil():
-    """() => PHIL
-
-    Obtain a reference to the PHIL.  For debugging and internal use only.
-    """
-    global phil
-    return phil
-
-# Everything required for these decorators is now defined
-
-from _sync import sync, nosync
-
 # === Public C API for object identifiers =====================================
 
 cdef class ObjectID:
@@ -260,11 +218,8 @@ cdef class ObjectID:
         """ Indicates whether or not this identifier points to an HDF5 object.
         """
         def __get__(self):
-            phil.acquire()
-            try:
-                return H5Iget_type(self.id) != H5I_BADID
-            finally:
-                phil.release()
+            return H5Iget_type(self.id) != H5I_BADID
+
     
     def __nonzero__(self):
         """ Truth value for object identifiers (like _valid) """
@@ -282,10 +237,6 @@ cdef class ObjectID:
     def __dealloc__(self):
         """ Automatically decrefs the ID, if it's valid. """
 
-        # Acquiring PHIL leads to segfault in presence of cyclic
-        # garbage collection.  We'll have to hope this isn't called while
-        # an HDF5 callback is in progress.
-
         IF H5PY_DEBUG:
             log_ident.debug("- %d" % self.id)
         if (not self._locked) and H5Iget_type(self.id) != H5I_BADID:
@@ -299,17 +250,13 @@ cdef class ObjectID:
             across copies.
         """
         cdef ObjectID copy
-        phil.acquire()
-        try:
-            copy = type(self)(self.id)
-            if self._valid and not self._locked:
-                H5Iinc_ref(self.id)
-            copy._locked = self._locked
-            IF H5PY_DEBUG:
-                log_ident.debug("c %s" % str(self))
-            return copy
-        finally:
-            phil.release()
+        copy = type(self)(self.id)
+        if self._valid and not self._locked:
+            H5Iinc_ref(self.id)
+        copy._locked = self._locked
+        IF H5PY_DEBUG:
+            log_ident.debug("c %s" % str(self))
+        return copy
 
     def __richcmp__(self, object other, int how):
         """ Basic comparison for HDF5 objects.  Implements only equality:
@@ -340,30 +287,25 @@ cdef class ObjectID:
         cdef H5G_stat_t stat
 
         if self._hash is None:
-            phil.acquire()
             try:
                 H5Gget_objinfo(self.id, '.', 0, &stat)
                 self._hash = hash((stat.fileno[0], stat.fileno[1], stat.objno[0], stat.objno[1]))
             except Exception:
                 raise TypeError("Objects of class %s cannot be hashed" % self.__class__.__name__)
-            finally:
-                phil.release()
 
         return self._hash
 
     def __repr__(self):
-        phil.acquire()
-        try:
-            ref = str(H5Iget_ref(self.id)) if self._valid else "X"
-            lck = "L" if self._locked else "U"
-            return "<%s [%s] (%s) %d>" % (self.__class__.__name__, ref, lck, self.id)
-        finally:
-            phil.release()
+
+        ref = str(H5Iget_ref(self.id)) if self._valid else "X"
+        lck = "L" if self._locked else "U"
+        return "<%s [%s] (%s) %d>" % (self.__class__.__name__, ref, lck, self.id)
+
 
 
 # === HDF5 "H5" API ===========================================================
 
- at sync
+
 def get_libversion():
     """ () => TUPLE (major, minor, release)
 
@@ -378,7 +320,7 @@ def get_libversion():
 
     return (major, minor, release)
 
- at sync
+
 def _close():
     """ Internal function; do not call unless you want to lose all your data.
 
@@ -386,7 +328,7 @@ def _close():
     """
     H5close()
 
- at sync
+
 def _open():
     """ Internal function; do not call unless you want to lose all your data.
 
diff --git a/h5py/h5a.pyx b/h5py/h5a.pyx
index 75dedfe..8a4553a 100644
--- a/h5py/h5a.pyx
+++ b/h5py/h5a.pyx
@@ -29,15 +29,12 @@ from _proxy cimport attr_rw
 import_array()
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === General attribute operations ============================================
 
 # --- create, create_by_name ---
 
 IF H5PY_18API:
-    @sync
+    
     def create(ObjectID loc not None, char* name, TypeID tid not None,
         SpaceID space not None, *, char* obj_name='.', PropID lapl=None):
         """(ObjectID loc, STRING name, TypeID tid, SpaceID space, **kwds) => AttrID
@@ -55,7 +52,7 @@ IF H5PY_18API:
                 space.id, H5P_DEFAULT, H5P_DEFAULT, pdefault(lapl)))
 
 ELSE:
-    @sync
+    
     def create(ObjectID loc not None, char* name, TypeID tid not None, 
         SpaceID space not None):
         """(ObjectID loc, STRING name, TypeID tid, SpaceID space) => AttrID
@@ -69,7 +66,7 @@ ELSE:
 # --- open, open_by_name, open_by_idx ---
 
 IF H5PY_18API:
-    @sync
+    
     def open(ObjectID loc not None, char* name=NULL, int index=-1, *,
         char* obj_name='.', int index_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
         PropID lapl=None):
@@ -101,7 +98,7 @@ IF H5PY_18API:
                 H5P_DEFAULT, pdefault(lapl)))
 
 ELSE:
-    @sync
+    
     def open(ObjectID loc not None, char* name=NULL, int index=-1):
         """(ObjectID loc, STRING name=, INT index=) => AttrID
 
@@ -120,7 +117,7 @@ ELSE:
 # --- exists, exists_by_name ---
 
 IF H5PY_18API:
-    @sync
+    
     def exists(ObjectID loc not None, char* name, *,
                 char* obj_name=".", PropID lapl=None):
         """(ObjectID loc, STRING name, **kwds) => BOOL
@@ -142,7 +139,7 @@ ELSE:
             return 1
         return 0
 
-    @sync
+    
     def exists(ObjectID loc not None, char* name):
         """(ObjectID loc, STRING name) => BOOL
 
@@ -156,7 +153,7 @@ ELSE:
 # --- rename, rename_by_name ---
 
 IF H5PY_18API:
-    @sync
+    
     def rename(ObjectID loc not None, char* name, char* new_name, *,
         char* obj_name='.', PropID lapl=None):
         """(ObjectID loc, STRING name, STRING new_name, **kwds)
@@ -172,7 +169,7 @@ IF H5PY_18API:
         H5Arename_by_name(loc.id, obj_name, name, new_name, pdefault(lapl))
 
 IF H5PY_18API:
-    @sync
+    
     def delete(ObjectID loc not None, char* name=NULL, int index=-1, *,
         char* obj_name='.', int index_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
         PropID lapl=None):
@@ -200,7 +197,7 @@ IF H5PY_18API:
             raise TypeError("Exactly one of index or name must be specified.")
 
 ELSE:
-    @sync
+    
     def delete(ObjectID loc not None, char* name):
         """(ObjectID loc, STRING name)
 
@@ -208,7 +205,7 @@ ELSE:
         """
         H5Adelete(loc.id, name)
 
- at sync
+
 def get_num_attrs(ObjectID loc not None):
     """(ObjectID loc) => INT
 
@@ -242,7 +239,7 @@ IF H5PY_18API:
         def _hash(self):
             return hash((self.corder_valid, self.corder, self.cset, self.data_size))
 
-    @sync
+    
     def get_info(ObjectID loc not None, char* name=NULL, int index=-1, *,
                 char* obj_name='.', PropID lapl=None,
                 int index_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE):
@@ -307,7 +304,7 @@ IF H5PY_18API:
             return 1
         return 0
 
-    @sync
+    
     def iterate(ObjectID loc not None, object func, int index=0, *,
         int index_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE, bint info=0):
         """(ObjectID loc, CALLABLE func, INT index=0, **kwds) => <Return value from func>
@@ -360,7 +357,7 @@ ELSE:
             return 1
         return 0
 
-    @sync
+    
     def iterate(ObjectID loc not None, object func, int index=0):
         """(ObjectID loc, CALLABLE func, INT index=0) => <Return value from func>
 
@@ -421,7 +418,7 @@ cdef class AttrID(ObjectID):
             tid = self.get_type()
             return tid.py_dtype()
 
-    @sync
+    
     def _close(self):
         """()
 
@@ -431,7 +428,7 @@ cdef class AttrID(ObjectID):
         """
         H5Aclose(self.id)
 
-    @sync
+    
     def read(self, ndarray arr not None):
         """(NDARRAY arr)
 
@@ -458,7 +455,7 @@ cdef class AttrID(ObjectID):
             if space_id:
                 H5Sclose(space_id)
 
-    @sync
+    
     def write(self, ndarray arr not None):
         """(NDARRAY arr)
 
@@ -484,7 +481,7 @@ cdef class AttrID(ObjectID):
             if space_id:
                 H5Sclose(space_id)
 
-    @sync
+    
     def get_name(self):
         """() => STRING name
 
@@ -505,7 +502,7 @@ cdef class AttrID(ObjectID):
 
         return strout
 
-    @sync
+    
     def get_space(self):
         """() => SpaceID
 
@@ -513,7 +510,7 @@ cdef class AttrID(ObjectID):
         """
         return SpaceID(H5Aget_space(self.id))
 
-    @sync
+    
     def get_type(self):
         """() => TypeID
 
@@ -522,7 +519,7 @@ cdef class AttrID(ObjectID):
         return typewrap(H5Aget_type(self.id))
 
     IF H5PY_18API:
-        @sync
+        
         def get_storage_size(self):
             """() => INT
 
diff --git a/h5py/h5d.pyx b/h5py/h5d.pyx
index d0f0aca..24988af 100644
--- a/h5py/h5d.pyx
+++ b/h5py/h5d.pyx
@@ -30,9 +30,6 @@ from _proxy cimport dset_rw
 import_array()
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === Public constants and data structures ====================================
 
 COMPACT     = H5D_COMPACT
@@ -59,7 +56,7 @@ FILL_VALUE_USER_DEFINED = H5D_FILL_VALUE_USER_DEFINED
 
 # === Dataset operations ======================================================
 
- at sync
+
 def create(ObjectID loc not None, char* name, TypeID tid not None, 
             SpaceID space not None, PropID dcpl=None):
     """ (ObjectID loc, STRING name, TypeID tid, SpaceID space,
@@ -71,7 +68,7 @@ def create(ObjectID loc not None, char* name, TypeID tid not None,
     """
     return DatasetID(H5Dcreate(loc.id, name, tid.id, space.id, pdefault(dcpl)))
 
- at sync
+
 def open(ObjectID loc not None, char* name):
     """ (ObjectID loc, STRING name) => DatasetID
 
@@ -126,7 +123,7 @@ cdef class DatasetID(ObjectID):
             sid = self.get_space()
             return sid.get_simple_extent_ndims()
 
-    @sync
+    
     def _close(self):
         """ ()
 
@@ -136,7 +133,7 @@ cdef class DatasetID(ObjectID):
         """
         H5Dclose(self.id)
 
-    @sync
+    
     def read(self, SpaceID mspace not None, SpaceID fspace not None, 
                    ndarray arr_obj not None, TypeID mtype=None,
                    PropID dxpl=None):
@@ -178,7 +175,7 @@ cdef class DatasetID(ObjectID):
         finally:
             arr_obj.flags |= NPY_WRITEABLE
 
-    @sync
+    
     def write(self, SpaceID mspace not None, SpaceID fspace not None, 
                     ndarray arr_obj not None, TypeID mtype=None,
                     PropID dxpl=None):
@@ -212,7 +209,7 @@ cdef class DatasetID(ObjectID):
         finally:
             arr_obj.flags |= NPY_WRITEABLE
 
-    @sync
+    
     def extend(self, tuple shape):
         """ (TUPLE shape)
 
@@ -240,7 +237,7 @@ cdef class DatasetID(ObjectID):
             if space_id:
                 H5Sclose(space_id)
 
-    @sync
+    
     def set_extent(self, tuple shape):
         """ (TUPLE shape)
 
@@ -269,7 +266,7 @@ cdef class DatasetID(ObjectID):
                 H5Sclose(space_id)
 
 
-    @sync
+    
     def get_space(self):
         """ () => SpaceID
 
@@ -277,7 +274,7 @@ cdef class DatasetID(ObjectID):
         """
         return SpaceID(H5Dget_space(self.id))
 
-    @sync
+    
     def get_space_status(self):
         """ () => INT space_status_code
 
@@ -292,7 +289,7 @@ cdef class DatasetID(ObjectID):
         H5Dget_space_status(self.id, &status)
         return <int>status
 
-    @sync
+    
     def get_type(self):
         """ () => TypeID
 
@@ -300,7 +297,7 @@ cdef class DatasetID(ObjectID):
         """
         return typewrap(H5Dget_type(self.id))
 
-    @sync
+    
     def get_create_plist(self):
         """ () => PropDCID
 
@@ -309,7 +306,7 @@ cdef class DatasetID(ObjectID):
         """
         return propwrap(H5Dget_create_plist(self.id))
 
-    @sync
+    
     def get_offset(self):
         """ () => LONG offset or None
 
@@ -324,7 +321,7 @@ cdef class DatasetID(ObjectID):
             return None
         return offset
 
-    @sync
+    
     def get_storage_size(self):
         """ () => LONG storage_size
 
diff --git a/h5py/h5e.pyx b/h5py/h5e.pyx
index 0a9f570..7252276 100644
--- a/h5py/h5e.pyx
+++ b/h5py/h5e.pyx
@@ -357,11 +357,8 @@ cdef herr_t walk_cb(int n, H5E_error_t *err_desc, void* stack_in):
 
 cdef herr_t err_callback(void* client_data) with gil:
     # Callback which sets Python exception based on the current error stack.
-
     # MUST be "with gil" as it can be called by nogil HDF5 routines.
-    # By definition any function for which this can be called already
-    # holds the PHIL.
-    
+
     if PyErr_Occurred() != NULL:
         # Native Python exceptions can occur inside HDF5 callbacks
         return 1
diff --git a/h5py/h5f.pyx b/h5py/h5f.pyx
index f3fd8cd..aa0b5cc 100644
--- a/h5py/h5f.pyx
+++ b/h5py/h5f.pyx
@@ -26,9 +26,6 @@ from utils cimport emalloc, efree
 # Initialization
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === Public constants and data structures ====================================
 
 ACC_TRUNC   = H5F_ACC_TRUNC
@@ -54,7 +51,7 @@ OBJ_LOCAL   = H5F_OBJ_LOCAL
 
 # === File operations =========================================================
 
- at sync
+
 def open(char* name, unsigned int flags=H5F_ACC_RDWR, PropFAID fapl=None):
     """(STRING name, UINT flags=ACC_RDWR, PropFAID fapl=None) => FileID
 
@@ -73,7 +70,7 @@ def open(char* name, unsigned int flags=H5F_ACC_RDWR, PropFAID fapl=None):
         logging.getLogger('h5py.library').info('* Opening file %s' % name)
     return FileID(H5Fopen(name, flags, pdefault(fapl)))
 
- at sync
+
 def create(char* name, int flags=H5F_ACC_TRUNC, PropFCID fcpl=None,
                                                 PropFAID fapl=None):
     """(STRING name, INT flags=ACC_TRUNC, PropFCID fcpl=None,
@@ -95,7 +92,7 @@ def create(char* name, int flags=H5F_ACC_TRUNC, PropFCID fcpl=None,
         logging.getLogger('h5py.library').info('* Creating file %s' % name)
     return FileID(H5Fcreate(name, flags, pdefault(fcpl), pdefault(fapl)))
 
- at sync
+
 def flush(ObjectID obj not None, int scope=H5F_SCOPE_LOCAL):
     """(ObjectID obj, INT scope=SCOPE_LOCAL)
 
@@ -111,7 +108,7 @@ def flush(ObjectID obj not None, int scope=H5F_SCOPE_LOCAL):
     """
     H5Fflush(obj.id, <H5F_scope_t>scope)
 
- at sync
+
 def is_hdf5(char* name):
     """(STRING name) => BOOL
 
@@ -120,7 +117,7 @@ def is_hdf5(char* name):
     """
     return <bint>(H5Fis_hdf5(name))
 
- at sync
+
 def mount(ObjectID loc not None, char* name, FileID fid not None):
     """(ObjectID loc, STRING name, FileID fid)
 
@@ -129,7 +126,7 @@ def mount(ObjectID loc not None, char* name, FileID fid not None):
     """
     H5Fmount(loc.id, name, fid.id, H5P_DEFAULT)
 
- at sync
+
 def unmount(ObjectID loc not None, char* name):
     """(ObjectID loc, STRING name)
 
@@ -137,7 +134,7 @@ def unmount(ObjectID loc not None, char* name):
     """
     H5Funmount(loc.id, name)
 
- at sync
+
 def get_name(ObjectID obj not None):
     """(ObjectID obj) => STRING
     
@@ -157,7 +154,7 @@ def get_name(ObjectID obj not None):
     finally:
         efree(name)
 
- at sync
+
 def get_obj_count(object where=OBJ_ALL, int types=H5F_OBJ_ALL):
     """(OBJECT where=OBJ_ALL, types=OBJ_ALL) => INT
 
@@ -185,7 +182,7 @@ def get_obj_count(object where=OBJ_ALL, int types=H5F_OBJ_ALL):
 
     return H5Fget_obj_count(where_id, types)
 
- at sync
+
 def get_obj_ids(object where=OBJ_ALL, int types=H5F_OBJ_ALL):
     """(OBJECT where=OBJ_ALL, types=OBJ_ALL) => LIST
 
@@ -258,7 +255,7 @@ cdef class FileID(ObjectID):
         def __get__(self):
             return get_name(self)
 
-    @sync
+    
     def close(self):
         """()
 
@@ -272,7 +269,7 @@ cdef class FileID(ObjectID):
             logging.getLogger('h5py.library').info('* Closing file %s' % self.name)
         H5Fclose(self.id)
 
-    @sync
+    
     def reopen(self):
         """() => FileID
 
@@ -282,7 +279,7 @@ cdef class FileID(ObjectID):
         """
         return FileID(H5Freopen(self.id))
 
-    @sync
+    
     def get_filesize(self):
         """() => LONG size
 
@@ -293,7 +290,7 @@ cdef class FileID(ObjectID):
         H5Fget_filesize(self.id, &size)
         return size
 
-    @sync
+    
     def get_create_plist(self):
         """() => PropFCID
 
@@ -302,7 +299,7 @@ cdef class FileID(ObjectID):
         """
         return propwrap(H5Fget_create_plist(self.id))
 
-    @sync
+    
     def get_access_plist(self):
         """() => PropFAID
 
@@ -311,7 +308,7 @@ cdef class FileID(ObjectID):
         """
         return propwrap(H5Fget_access_plist(self.id))
 
-    @sync
+    
     def get_freespace(self):
         """() => LONG freespace
 
diff --git a/h5py/h5g.pyx b/h5py/h5g.pyx
index 0faa308..bbccf45 100644
--- a/h5py/h5g.pyx
+++ b/h5py/h5g.pyx
@@ -29,7 +29,6 @@ init_hdf5()
 
 # Runtime imports
 from h5 import H5Error
-from _sync import sync, nosync
 
 # === Public constants and data structures ====================================
 
@@ -117,7 +116,7 @@ cdef class GroupIter:
 
 # === Basic group management ==================================================
 
- at sync
+
 def open(ObjectID loc not None, char* name):
     """(ObjectID loc, STRING name) => GroupID
 
@@ -126,7 +125,7 @@ def open(ObjectID loc not None, char* name):
     return GroupID(H5Gopen(loc.id, name))
 
 IF H5PY_18API:
-    @sync
+    
     def create(ObjectID loc not None, char* name, PropID lcpl=None,
                PropID gcpl=None):
         """(ObjectID loc, STRING name, PropLCID lcpl=None, PropGCID gcpl=None)
@@ -138,7 +137,7 @@ IF H5PY_18API:
                                                 pdefault(gcpl),
                                                 H5P_DEFAULT))
 ELSE:
-    @sync
+    
     def create(ObjectID loc not None, char* name):
         """(ObjectID loc, STRING name) => GroupID
 
@@ -165,7 +164,7 @@ cdef herr_t cb_group_iter(hid_t gid, char *name, void* vis_in) except 2:
         return 1
     return 0
 
- at sync
+
 def iterate(GroupID loc not None, object func, int startidx=0, *,
             char* obj_name='.'):
     """ (GroupID loc, CALLABLE func, UINT startidx=0, **kwds)
@@ -192,7 +191,7 @@ def iterate(GroupID loc not None, object func, int startidx=0, *,
 
     return vis.retval
 
- at sync
+
 def get_objinfo(ObjectID obj not None, object name='.', int follow_link=1):
     """(ObjectID obj, STRING name='.', BOOL follow_link=True) => GroupStat object
 
@@ -244,7 +243,7 @@ cdef class GroupID(ObjectID):
         def __init__(self, hid_t id_):
             self.links = LinkProxy(id_)
 
-    @sync
+    
     def _close(self):
         """()
 
@@ -254,7 +253,7 @@ cdef class GroupID(ObjectID):
         """
         H5Gclose(self.id)
 
-    @sync
+    
     def link(self, char* current_name, char* new_name, 
              int link_type=H5G_LINK_HARD, GroupID remote=None):
         """(STRING current_name, STRING new_name, INT link_type=LINK_HARD, 
@@ -281,7 +280,7 @@ cdef class GroupID(ObjectID):
         H5Glink2(self.id, current_name, <H5G_link_t>link_type, remote_id, new_name)
 
 
-    @sync
+    
     def unlink(self, char* name):
         """(STRING name)
 
@@ -290,7 +289,7 @@ cdef class GroupID(ObjectID):
         H5Gunlink(self.id, name)
    
 
-    @sync
+    
     def move(self, char* current_name, char* new_name, GroupID remote=None):
         """(STRING current_name, STRING new_name, GroupID remote=None)
 
@@ -307,7 +306,7 @@ cdef class GroupID(ObjectID):
         H5Gmove2(self.id, current_name, remote_id, new_name)
 
 
-    @sync
+    
     def get_num_objs(self):
         """() => INT number_of_objects
 
@@ -318,7 +317,7 @@ cdef class GroupID(ObjectID):
         return size
 
 
-    @sync
+    
     def get_objname_by_idx(self, hsize_t idx):
         """(INT idx) => STRING
 
@@ -345,7 +344,7 @@ cdef class GroupID(ObjectID):
             efree(buf)
 
 
-    @sync
+    
     def get_objtype_by_idx(self, hsize_t idx):
         """(INT idx) => INT object_type_code
 
@@ -368,7 +367,7 @@ cdef class GroupID(ObjectID):
         return retval
 
 
-    @sync
+    
     def get_linkval(self, char* name):
         """(STRING name) => STRING link_value
 
@@ -397,7 +396,7 @@ cdef class GroupID(ObjectID):
         finally:
             efree(value)
 
-    @sync
+    
     def set_comment(self, char* name, char* comment):
         """(STRING name, STRING comment)
 
@@ -405,7 +404,7 @@ cdef class GroupID(ObjectID):
         """
         H5Gset_comment(self.id, name, comment)
 
-    @sync
+    
     def get_comment(self, char* name):
         """(STRING name) => STRING comment
 
@@ -428,7 +427,7 @@ cdef class GroupID(ObjectID):
 
     # === Special methods =====================================================
 
-    @sync
+    
     def __contains__(self, char* name):
         """(STRING name)
 
@@ -445,12 +444,12 @@ cdef class GroupID(ObjectID):
 
         return bool(retval >= 0)
 
-    @nosync
+    
     def __iter__(self):
         """ Return an iterator over the names of group members. """
         return GroupIter(self)
 
-    @sync
+    
     def __len__(self):
         """ Number of group members """
         cdef hsize_t size
diff --git a/h5py/h5i.pyx b/h5py/h5i.pyx
index a700529..0ffb651 100644
--- a/h5py/h5i.pyx
+++ b/h5py/h5i.pyx
@@ -31,7 +31,6 @@ init_hdf5()
 
 # Runtime imports
 from h5 import H5Error
-from _sync import sync, nosync
 
 # === Public constants and data structures ====================================
 
@@ -71,7 +70,7 @@ cdef ObjectID wrap_identifier(hid_t ident):
 
 # === Identifier API ==========================================================
 
- at sync
+
 def get_type(ObjectID obj not None):
     """ (ObjectID obj) => INT type_code
 
@@ -81,7 +80,7 @@ def get_type(ObjectID obj not None):
     """
     return <int>H5Iget_type(obj.id)
 
- at sync
+
 def get_name(ObjectID obj not None):
     """ (ObjectID obj) => STRING name, or None
 
@@ -113,7 +112,7 @@ def get_name(ObjectID obj not None):
     finally:
         efree(name)
 
- at sync
+
 def get_file_id(ObjectID obj not None):
     """ (ObjectID obj) => FileID
 
@@ -121,7 +120,7 @@ def get_file_id(ObjectID obj not None):
     """
     return FileID(H5Iget_file_id(obj.id))
 
- at sync
+
 def inc_ref(ObjectID obj not None):
     """ (ObjectID obj)
 
@@ -133,7 +132,7 @@ def inc_ref(ObjectID obj not None):
     """
     H5Iinc_ref(obj.id)
 
- at sync
+
 def get_ref(ObjectID obj not None):
     """ (ObjectID obj) => INT
 
@@ -141,7 +140,7 @@ def get_ref(ObjectID obj not None):
     """
     return H5Iget_ref(obj.id)
 
- at sync
+
 def dec_ref(ObjectID obj not None):
     """ (ObjectID obj)
 
diff --git a/h5py/h5l_body.pyx b/h5py/h5l_body.pyx
index e06fb4b..3cb1a76 100644
--- a/h5py/h5l_body.pyx
+++ b/h5py/h5l_body.pyx
@@ -25,9 +25,6 @@ from python_exc cimport PyErr_SetString
 
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === Public constants ========================================================
 
 TYPE_HARD = H5L_TYPE_HARD         
@@ -126,7 +123,7 @@ cdef class LinkProxy:
     def __hash__(self):
         raise TypeError("Link proxies are unhashable; use the parent group instead.")
 
-    @sync
+    
     def create_hard(self, char* new_name, GroupID cur_loc not None,
         char* cur_name, PropID lcpl=None, PropID lapl=None):
         """ (STRING new_name, GroupID cur_loc, STRING cur_name,
@@ -138,7 +135,7 @@ cdef class LinkProxy:
         H5Lcreate_hard(cur_loc.id, cur_name, self.id, new_name,
             pdefault(lcpl), pdefault(lapl))
 
-    @sync
+    
     def create_soft(self, char* new_name, char* target,
         PropID lcpl=None, PropID lapl=None):
         """(STRING new_name, STRING target, PropID lcpl=None, PropID lapl=None)
@@ -149,7 +146,7 @@ cdef class LinkProxy:
         H5Lcreate_soft(target, self.id, new_name,
             pdefault(lcpl), pdefault(lapl))
 
-    @sync
+    
     def create_external(self, char* link_name, char* file_name, char* obj_name,
         PropID lcpl=None, PropID lapl=None):
         """(STRING link_name, STRING file_name, STRING obj_name,
@@ -160,7 +157,7 @@ cdef class LinkProxy:
         H5Lcreate_external(file_name, obj_name, self.id, link_name,
             pdefault(lcpl), pdefault(lapl))
 
-    @sync
+    
     def get_val(self, char* name, PropID lapl=None):
         """(STRING name, PropLAID lapl=None) => STRING or TUPLE(file, obj)
 
@@ -193,7 +190,7 @@ cdef class LinkProxy:
         
         return py_retval
 
-    @sync
+    
     def exists(self, char* name):
         """ (STRING name) => BOOL
 
@@ -201,7 +198,7 @@ cdef class LinkProxy:
         """
         return <bint>(H5Lexists(self.id, name, H5P_DEFAULT))
 
-    @sync
+    
     def get_info(self, char* name, int index=-1, *, PropID lapl=None):
         """(STRING name=, INT index=, **kwds) => LinkInfo instance
 
@@ -213,7 +210,7 @@ cdef class LinkProxy:
         H5Lget_info(self.id, name, &info.infostruct, pdefault(lapl))
         return info
 
-    @sync
+    
     def visit(self, object func, *,
               int idx_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
               char* obj_name='.', PropID lapl=None, bint info=0):
diff --git a/h5py/h5o_body.pyx b/h5py/h5o_body.pyx
index d2bb001..7e0ee07 100644
--- a/h5py/h5o_body.pyx
+++ b/h5py/h5o_body.pyx
@@ -27,9 +27,6 @@ from utils cimport emalloc, efree
 # Initialization
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === Public constants ========================================================
     
 TYPE_GROUP = H5O_TYPE_GROUP    
@@ -139,7 +136,7 @@ cdef class ObjInfo(_ObjInfo):
         newcopy.infostruct = self.infostruct
         return newcopy
 
- at sync
+
 def get_info(ObjectID loc not None, char* name=NULL, int index=-1, *,
         char* obj_name='.', int index_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
         PropID lapl=None):
@@ -176,7 +173,7 @@ def get_info(ObjectID loc not None, char* name=NULL, int index=-1, *,
 
 # === General object operations ===============================================
 
- at sync
+
 def open(ObjectID loc not None, char* name, PropID lapl=None):
     """(ObjectID loc, STRING name, PropID lapl=None) => ObjectID
 
@@ -184,7 +181,7 @@ def open(ObjectID loc not None, char* name, PropID lapl=None):
     """
     return wrap_identifier(H5Oopen(loc.id, name, pdefault(lapl)))
 
- at sync
+
 def link(ObjectID obj not None, GroupID loc not None, char* name,
     PropID lcpl=None, PropID lapl=None):
     """(ObjectID obj, GroupID loc, STRING name, PropID lcpl=None,
@@ -195,7 +192,7 @@ def link(ObjectID obj not None, GroupID loc not None, char* name,
     """
     H5Olink(obj.id, loc.id, name, pdefault(lcpl), pdefault(lapl))
 
- at sync
+
 def copy(GroupID src_loc not None, char* src_name, GroupID dst_loc not None,
     char* dst_name, PropID copypl=None, PropID lcpl=None):
     """(GroupID src_loc, STRING src_name, GroupID dst_loc, STRING dst_name,
@@ -210,7 +207,7 @@ def copy(GroupID src_loc not None, char* src_name, GroupID dst_loc not None,
     H5Ocopy(src_loc.id, src_name, dst_loc.id, dst_name, pdefault(copypl),
         pdefault(lcpl))
 
- at sync
+
 def set_comment(ObjectID loc not None, char* comment, *, char* obj_name=".",
     PropID lapl=None):
     """(ObjectID loc, STRING comment, **kwds)
@@ -226,7 +223,7 @@ def set_comment(ObjectID loc not None, char* comment, *, char* obj_name=".",
     H5Oset_comment_by_name(loc.id, obj_name, comment, pdefault(lapl))
 
 
- at sync
+
 def get_comment(ObjectID loc not None, char* comment, *, char* obj_name=".",
     PropID lapl=None):
     """(ObjectID loc, STRING comment, **kwds)
@@ -296,7 +293,7 @@ cdef herr_t cb_obj_simple(hid_t obj, char* name, H5O_info_t *info, void* data) e
         return 1
     return 0
 
- at sync
+
 def visit(ObjectID loc not None, object func, *,
           int idx_type=H5_INDEX_NAME, int order=H5_ITER_NATIVE,
           char* obj_name=".", PropID lapl=None, bint info=0):
diff --git a/h5py/h5p.pyx b/h5py/h5p.pyx
index 2b2b06e..6549627 100644
--- a/h5py/h5p.pyx
+++ b/h5py/h5p.pyx
@@ -28,9 +28,6 @@ from h5t cimport TypeID, py_create
 init_hdf5()
 import_array()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === C API ===================================================================
 
 cdef hid_t pdefault(PropID pid):
@@ -102,7 +99,7 @@ DEFAULT = None   # In the HDF5 header files this is actually 0, which is an
 # === Property list functional API ============================================
 
 IF H5PY_18API:
-    @sync
+    
     def create(PropClassID cls not None):
         """(PropClassID cls) => PropID
         
@@ -121,7 +118,7 @@ IF H5PY_18API:
         newid = H5Pcreate(cls.id)
         return propwrap(newid)
 ELSE:
-    @sync
+    
     def create(PropClassID cls not None):
         """(PropClassID cls) => PropID
         
@@ -144,7 +141,7 @@ cdef class PropID(ObjectID):
         Base class for all property lists and classes
     """
 
-    @sync
+    
     def equal(self, PropID plist not None):
         """(PropID plist) => BOOL
 
@@ -194,7 +191,7 @@ cdef class PropInstanceID(PropID):
         * Equality: Logical H5P comparison
     """
 
-    @sync
+    
     def copy(self):
         """() => PropList newid
 
@@ -202,7 +199,7 @@ cdef class PropInstanceID(PropID):
         """
         return type(self)(H5Pcopy(self.id))
 
-    @sync
+    
     def _close(self):
         """()
     
@@ -212,7 +209,7 @@ cdef class PropInstanceID(PropID):
         """
         H5Pclose(self.id)
 
-    @sync
+    
     def get_class(self):
         """() => PropClassID
 
@@ -241,7 +238,7 @@ cdef class PropCopyID(PropInstanceID):
 
     IF H5PY_18API:
 
-        @sync
+        
         def set_copy_object(self, unsigned int flags):
             """(UINT flags)
 
@@ -265,7 +262,7 @@ cdef class PropCopyID(PropInstanceID):
             """
             H5Pset_copy_object(self.id, flags)
 
-        @sync
+        
         def get_copy_object(self):
             """() => UINT flags
 
diff --git a/h5py/h5p_dcid.pxi b/h5py/h5p_dcid.pxi
index 6851e36..0e78c74 100644
--- a/h5py/h5p_dcid.pxi
+++ b/h5py/h5p_dcid.pxi
@@ -16,7 +16,7 @@ cdef class PropDCID(PropCreateID):
         Dataset creation property list.
     """
 
-    @sync
+    
     def set_layout(self, int layout_code):
         """(INT layout_code)
 
@@ -28,7 +28,7 @@ cdef class PropDCID(PropCreateID):
         """
         H5Pset_layout(self.id, layout_code)
     
-    @sync
+    
     def get_layout(self):
         """() => INT layout_code
 
@@ -40,7 +40,7 @@ cdef class PropDCID(PropCreateID):
         """
         return <int>H5Pget_layout(self.id)
 
-    @sync
+    
     def set_chunk(self, object chunksize):
         """(TUPLE chunksize)
 
@@ -61,7 +61,7 @@ cdef class PropDCID(PropCreateID):
         finally:
             efree(dims)
 
-    @sync
+    
     def get_chunk(self):
         """() => TUPLE chunk_dimensions
 
@@ -81,7 +81,7 @@ cdef class PropDCID(PropCreateID):
         finally:
             efree(dims)
 
-    @sync
+    
     def set_fill_value(self, ndarray value not None):
         """(NDARRAY value)
 
@@ -95,7 +95,7 @@ cdef class PropDCID(PropCreateID):
         tid = py_create(value.dtype)        
         H5Pset_fill_value(self.id, tid.id, value.data)
 
-    @sync
+    
     def get_fill_value(self, ndarray value not None):
         """(NDARRAY value)
 
@@ -109,7 +109,7 @@ cdef class PropDCID(PropCreateID):
         tid = py_create(value.dtype)
         H5Pget_fill_value(self.id, tid.id, value.data)
 
-    @sync
+    
     def fill_value_defined(self):
         """() => INT fill_status
 
@@ -123,7 +123,7 @@ cdef class PropDCID(PropCreateID):
         H5Pfill_value_defined(self.id, &val)
         return <int>val
 
-    @sync
+    
     def set_fill_time(self, int fill_time):
         """(INT fill_time)
 
@@ -136,7 +136,7 @@ cdef class PropDCID(PropCreateID):
         """
         H5Pset_fill_time(self.id, <H5D_fill_time_t>fill_time)
 
-    @sync
+    
     def get_fill_time(self):
         """ () => INT
 
@@ -151,7 +151,7 @@ cdef class PropDCID(PropCreateID):
         H5Pget_fill_time(self.id, &fill_time)
         return <int>fill_time
 
-    @sync
+    
     def set_alloc_time(self, int alloc_time):
         """(INT alloc_time)
 
@@ -159,7 +159,7 @@ cdef class PropDCID(PropCreateID):
         """
         H5Pset_alloc_time(self.id, <H5D_alloc_time_t>alloc_time)
 
-    @sync
+    
     def get_alloc_time(self):
         """() => INT alloc_time
 
@@ -172,7 +172,7 @@ cdef class PropDCID(PropCreateID):
 
     # === Filter functions ====================================================
     
-    @sync
+    
     def set_filter(self, int filter_code, unsigned int flags=0, object values=None):
         """(INT filter_code, UINT flags=0, TUPLE values=None)
 
@@ -214,7 +214,7 @@ cdef class PropDCID(PropCreateID):
         finally:
             efree(cd_values)
 
-    @sync
+    
     def all_filters_avail(self):
         """() => BOOL
 
@@ -223,7 +223,7 @@ cdef class PropDCID(PropCreateID):
         """
         return <bint>(H5Pall_filters_avail(self.id))
 
-    @sync
+    
     def get_nfilters(self):
         """() => INT
 
@@ -231,7 +231,7 @@ cdef class PropDCID(PropCreateID):
         """
         return H5Pget_nfilters(self.id)
 
-    @sync
+    
     def get_filter(self, int filter_idx):
         """(UINT filter_idx) => TUPLE filter_info
 
@@ -265,7 +265,7 @@ cdef class PropDCID(PropCreateID):
 
         return (filter_code, flags, tuple(vlist), name)
 
-    @sync
+    
     def _has_filter(self, int filter_code):
         """(INT filter_code)
 
@@ -280,7 +280,7 @@ cdef class PropDCID(PropCreateID):
                 return True
         return False
 
-    @sync
+    
     def get_filter_by_id(self, int filter_code):
         """(INT filter_code) => TUPLE filter_info or None
 
@@ -317,7 +317,7 @@ cdef class PropDCID(PropCreateID):
 
         return (flags, tuple(vlist), name)
 
-    @sync
+    
     def remove_filter(self, int filter_class):
         """(INT filter_class)
 
@@ -326,7 +326,7 @@ cdef class PropDCID(PropCreateID):
         """
         H5Premove_filter(self.id, <H5Z_filter_t>filter_class)
 
-    @sync
+    
     def set_deflate(self, unsigned int level=5):
         """(UINT level=5)
 
@@ -335,7 +335,7 @@ cdef class PropDCID(PropCreateID):
         """
         H5Pset_deflate(self.id, level)
 
-    @sync
+    
     def set_fletcher32(self):
         """()
 
@@ -343,7 +343,7 @@ cdef class PropDCID(PropCreateID):
         """
         H5Pset_fletcher32(self.id)
 
-    @sync
+    
     def set_shuffle(self):
         """()
 
@@ -352,7 +352,7 @@ cdef class PropDCID(PropCreateID):
         """
         H5Pset_shuffle(self.id)
 
-    @sync
+    
     def set_szip(self, unsigned int options, unsigned int pixels_per_block):
         """(UINT options, UINT pixels_per_block)
 
diff --git a/h5py/h5p_faid.pxi b/h5py/h5p_faid.pxi
index 4bfa84a..958ee11 100644
--- a/h5py/h5p_faid.pxi
+++ b/h5py/h5p_faid.pxi
@@ -16,7 +16,7 @@ cdef class PropFAID(PropInstanceID):
         File access property list
     """
 
-    @sync
+    
     def set_fclose_degree(self, int close_degree):
         """(INT close_degree)
 
@@ -30,7 +30,7 @@ cdef class PropFAID(PropInstanceID):
         """
         H5Pset_fclose_degree(self.id, <H5F_close_degree_t>close_degree)
 
-    @sync
+    
     def get_fclose_degree(self):
         """() => INT close_degree
         - h5fd.
@@ -46,7 +46,7 @@ cdef class PropFAID(PropInstanceID):
         H5Pget_fclose_degree(self.id, &deg)
         return deg
 
-    @sync
+    
     def set_fapl_core(self, size_t block_size=1024*1024, hbool_t backing_store=1):
         """(UINT increment=1M, BOOL backing_store=True)
 
@@ -62,7 +62,7 @@ cdef class PropFAID(PropInstanceID):
         """
         H5Pset_fapl_core(self.id, block_size, backing_store)
 
-    @sync
+    
     def get_fapl_core(self):
         """() => TUPLE core_settings
 
@@ -78,7 +78,7 @@ cdef class PropFAID(PropInstanceID):
         H5Pget_fapl_core(self.id, &increment, &backing_store)
         return (increment, <bint>(backing_store))
 
-    @sync
+    
     def set_fapl_family(self, hsize_t memb_size=2147483647, PropID memb_fapl=None):
         """(UINT memb_size=2**31-1, PropFAID memb_fapl=None)
 
@@ -94,7 +94,7 @@ cdef class PropFAID(PropInstanceID):
         plist_id = pdefault(memb_fapl)
         H5Pset_fapl_family(self.id, memb_size, plist_id)
 
-    @sync
+    
     def get_fapl_family(self):
         """() => TUPLE info
 
@@ -115,7 +115,7 @@ cdef class PropFAID(PropInstanceID):
 
         return (msize, plist)
 
-    @sync
+    
     def set_fapl_log(self, char* logfile, unsigned int flags, size_t buf_size):
         """(STRING logfile, UINT flags, UINT buf_size)
 
@@ -124,7 +124,7 @@ cdef class PropFAID(PropInstanceID):
         """
         H5Pset_fapl_log(self.id, logfile, flags, buf_size)
 
-    @sync
+    
     def set_fapl_sec2(self):
         """()
 
@@ -132,7 +132,7 @@ cdef class PropFAID(PropInstanceID):
         """
         H5Pset_fapl_sec2(self.id)
 
-    @sync
+    
     def set_fapl_stdio(self):
         """()
 
@@ -140,7 +140,7 @@ cdef class PropFAID(PropInstanceID):
         """
         H5Pset_fapl_stdio(self.id)
 
-    @sync
+    
     def get_driver(self):
         """() => INT driver code
 
@@ -159,7 +159,7 @@ cdef class PropFAID(PropInstanceID):
         """
         return H5Pget_driver(self.id)
 
-    @sync
+    
     def set_cache(self, int mdc, int rdcc, size_t rdcc_nbytes, double rdcc_w0):
         """(INT mdc, INT rdcc, UINT rdcc_nbytes, DOUBLE rdcc_w0)
 
@@ -168,7 +168,7 @@ cdef class PropFAID(PropInstanceID):
         """
         H5Pset_cache(self.id, mdc, rdcc, rdcc_nbytes, rdcc_w0)
 
-    @sync
+    
     def get_cache(self):
         """() => TUPLE cache info
 
@@ -187,7 +187,7 @@ cdef class PropFAID(PropInstanceID):
         H5Pget_cache(self.id, &mdc, &rdcc, &rdcc_nbytes, &w0)
         return (mdc, rdcc, rdcc_nbytes, w0)
 
-    @sync
+    
     def set_sieve_buf_size(self, size_t size):
         """ (UINT size)
 
@@ -197,7 +197,7 @@ cdef class PropFAID(PropInstanceID):
         """
         H5Pset_sieve_buf_size(self.id, size)
 
-    @sync
+    
     def get_sieve_buf_size(self):
         """ () => UINT size
 
diff --git a/h5py/h5p_fcid.pxi b/h5py/h5p_fcid.pxi
index 87cc6bf..83dd6db 100644
--- a/h5py/h5p_fcid.pxi
+++ b/h5py/h5p_fcid.pxi
@@ -16,7 +16,7 @@ cdef class PropFCID(PropCreateID):
         File creation property list.
     """
 
-    @sync
+    
     def get_version(self):
         """() => TUPLE version_info
 
@@ -38,7 +38,7 @@ cdef class PropFCID(PropCreateID):
 
         return (super_, freelist, stab, shhdr)
 
-    @sync
+    
     def set_userblock(self, hsize_t size):
         """(INT/LONG size)
 
@@ -47,7 +47,7 @@ cdef class PropFCID(PropCreateID):
         """
         H5Pset_userblock(self.id, size)
 
-    @sync
+    
     def get_userblock(self):
         """() => LONG size
 
@@ -57,7 +57,7 @@ cdef class PropFCID(PropCreateID):
         H5Pget_userblock(self.id, &size)
         return size
 
-    @sync
+    
     def set_sizes(self, size_t addr, size_t size):
         """(UINT addr, UINT size)
 
@@ -66,7 +66,7 @@ cdef class PropFCID(PropCreateID):
         """
         H5Pset_sizes(self.id, addr, size)
 
-    @sync
+    
     def get_sizes(self):
         """() => TUPLE sizes
 
diff --git a/h5py/h5p_laid.pxi b/h5py/h5p_laid.pxi
index 8cbee69..738f5fd 100644
--- a/h5py/h5p_laid.pxi
+++ b/h5py/h5p_laid.pxi
@@ -20,7 +20,7 @@ cdef class PropLAID(PropInstanceID):
     def __dealloc__(self):
         efree(self._buf)
 
-    @sync
+    
     def set_nlinks(self, size_t nlinks):
         """(UINT nlinks)
 
@@ -28,7 +28,7 @@ cdef class PropLAID(PropInstanceID):
         """
         H5Pset_nlinks(self.id, nlinks)
 
-    @sync
+    
     def get_nlinks(self):
         """() => UINT
 
@@ -38,7 +38,7 @@ cdef class PropLAID(PropInstanceID):
         H5Pget_nlinks(self.id, &nlinks)
         return nlinks
 
-    @sync
+    
     def set_elink_prefix(self, char* prefix):
         """(STRING prefix)
 
@@ -54,7 +54,7 @@ cdef class PropLAID(PropInstanceID):
 
         H5Pset_elink_prefix(self.id, self._buf)
 
-    @sync
+    
     def get_elink_prefix(self):
         """() => STRING prefix
 
diff --git a/h5py/h5p_lcid.pxi b/h5py/h5p_lcid.pxi
index 2ead312..b83f1ec 100644
--- a/h5py/h5p_lcid.pxi
+++ b/h5py/h5p_lcid.pxi
@@ -14,7 +14,7 @@ cdef class PropLCID(PropCreateID):
     
     """ Link creation property list """
 
-    @sync
+    
     def set_create_intermediate_group(self, bint create):
         """(BOOL create)
 
@@ -22,7 +22,7 @@ cdef class PropLCID(PropCreateID):
         """
         H5Pset_create_intermediate_group(self.id, create)
 
-    @sync
+    
     def get_create_intermediate_group(self):
         """() => BOOL 
 
diff --git a/h5py/h5r.pyx b/h5py/h5r.pyx
index f94f72e..9567e51 100644
--- a/h5py/h5r.pyx
+++ b/h5py/h5r.pyx
@@ -24,9 +24,6 @@ from h5s cimport SpaceID
 # Initialization
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === Public constants and data structures ====================================
 
 OBJECT = H5R_OBJECT
@@ -35,7 +32,7 @@ DATASET_REGION = H5R_DATASET_REGION
 
 # === Reference API ===========================================================
 
- at sync
+
 def create(ObjectID loc not None, char* name, int ref_type, SpaceID space=None):
     """(ObjectID loc, STRING name, INT ref_type, SpaceID space=None)
     => ReferenceObject ref
@@ -65,7 +62,7 @@ def create(ObjectID loc not None, char* name, int ref_type, SpaceID space=None):
 
     return ref
 
- at sync
+
 def dereference(Reference ref not None, ObjectID id not None):
     """(Reference ref, ObjectID id) => ObjectID
 
@@ -77,7 +74,7 @@ def dereference(Reference ref not None, ObjectID id not None):
     """
     return wrap_identifier(H5Rdereference(id.id, <H5R_type_t>ref.typecode, &ref.ref))
 
- at sync
+
 def get_region(Reference ref not None, ObjectID id not None):
     """(Reference ref, ObjectID id) => SpaceID
 
@@ -91,7 +88,7 @@ def get_region(Reference ref not None, ObjectID id not None):
     """
     return SpaceID(H5Rget_region(id.id, <H5R_type_t>ref.typecode, &ref.ref))
 
- at sync
+
 def get_obj_type(Reference ref not None, ObjectID id not None):
     """(Reference ref, ObjectID id) => INT obj_code
 
@@ -120,8 +117,6 @@ cdef class Reference:
         or a dataset region (DATASET_REGION).
     """
 
-
-    @nosync
     def __repr__(self):
         if self.typecode == H5R_OBJECT:
             return "<HDF5 object reference>"
diff --git a/h5py/h5s.pyx b/h5py/h5s.pyx
index 8f45c86..b3fa11b 100644
--- a/h5py/h5s.pyx
+++ b/h5py/h5s.pyx
@@ -26,9 +26,6 @@ from python_string cimport PyString_FromStringAndSize
 # Initialization
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 cdef object lockid(hid_t id_):
     cdef SpaceID space
     space = SpaceID(id_)
@@ -67,7 +64,7 @@ SEL_ALL         = H5S_SEL_ALL
 
 # === Basic dataspace operations ==============================================
 
- at sync
+
 def create(int class_code):
     """(INT class_code) => SpaceID
 
@@ -76,7 +73,7 @@ def create(int class_code):
     """
     return SpaceID(H5Screate(<H5S_class_t>class_code))
 
- at sync
+
 def create_simple(object dims_tpl, object max_dims_tpl=None):
     """(TUPLE dims_tpl, TUPLE max_dims_tpl) => SpaceID
 
@@ -110,7 +107,7 @@ def create_simple(object dims_tpl, object max_dims_tpl=None):
         efree(max_dims)
 
 IF H5PY_18API:
-    @sync
+    
     def decode(buf):
         """(STRING buf) => SpaceID
 
@@ -144,7 +141,7 @@ cdef class SpaceID(ObjectID):
         def __get__(self):
             return self.get_simple_extent_dims()
 
-    @sync
+    
     def _close(self):
         """()
 
@@ -154,7 +151,7 @@ cdef class SpaceID(ObjectID):
         """
         H5Sclose(self.id)
 
-    @sync
+    
     def copy(self):
         """() => SpaceID
 
@@ -163,7 +160,7 @@ cdef class SpaceID(ObjectID):
         return SpaceID(H5Scopy(self.id))
 
     IF H5PY_18API:    
-        @sync
+        
         def encode(self):
             """() => STRING
 
@@ -186,18 +183,18 @@ cdef class SpaceID(ObjectID):
     IF H5PY_18API:
         # Enable pickling
 
-        @nosync
+        
         def __reduce__(self):
             return (type(self), (-1,), self.encode())
 
-        @sync
+        
         def __setstate__(self, state):
             cdef char* buf = state
             self.id = H5Sdecode(buf)
 
     # === Simple dataspaces ===================================================
 
-    @sync
+    
     def is_simple(self):
         """() => BOOL is_simple
 
@@ -206,7 +203,7 @@ cdef class SpaceID(ObjectID):
         """
         return <bint>(H5Sis_simple(self.id))
 
-    @sync
+    
     def offset_simple(self, object offset=None):
         """(TUPLE offset=None)
 
@@ -240,7 +237,7 @@ cdef class SpaceID(ObjectID):
         finally:
             efree(dims)
 
-    @sync
+    
     def get_simple_extent_ndims(self):
         """() => INT rank
         
@@ -248,7 +245,7 @@ cdef class SpaceID(ObjectID):
         """
         return H5Sget_simple_extent_ndims(self.id)
 
-    @sync
+    
     def get_simple_extent_dims(self, int maxdims=0):
         """(BOOL maxdims=False) => TUPLE shape
 
@@ -272,7 +269,7 @@ cdef class SpaceID(ObjectID):
         finally:
             efree(dims)
     
-    @sync
+    
     def get_simple_extent_npoints(self):
         """() => LONG npoints
 
@@ -280,7 +277,7 @@ cdef class SpaceID(ObjectID):
         """
         return H5Sget_simple_extent_npoints(self.id)
 
-    @sync
+    
     def get_simple_extent_type(self):
         """() => INT class_code
 
@@ -290,7 +287,7 @@ cdef class SpaceID(ObjectID):
 
     # === Extents =============================================================
 
-    @sync
+    
     def extent_copy(self, SpaceID source not None):
         """(SpaceID source)
 
@@ -299,7 +296,7 @@ cdef class SpaceID(ObjectID):
         """
         H5Sextent_copy(self.id, source.id)
 
-    @sync
+    
     def set_extent_simple(self, object dims_tpl, object max_dims_tpl=None):
         """(TUPLE dims_tpl, TUPLE max_dims_tpl=None)
 
@@ -332,7 +329,7 @@ cdef class SpaceID(ObjectID):
             efree(dims)
             efree(max_dims)
 
-    @sync
+    
     def set_extent_none(self):
         """()
 
@@ -342,7 +339,7 @@ cdef class SpaceID(ObjectID):
 
     # === General selection operations ========================================
 
-    @sync
+    
     def get_select_type(self):
         """ () => INT select_code
 
@@ -355,7 +352,7 @@ cdef class SpaceID(ObjectID):
         """
         return <int>H5Sget_select_type(self.id)
 
-    @sync
+    
     def get_select_npoints(self):
         """() => LONG npoints
 
@@ -364,7 +361,7 @@ cdef class SpaceID(ObjectID):
         """
         return H5Sget_select_npoints(self.id)
 
-    @sync
+    
     def get_select_bounds(self):
         """() => (TUPLE start, TUPLE end)
 
@@ -391,7 +388,7 @@ cdef class SpaceID(ObjectID):
             efree(start)
             efree(end)
 
-    @sync
+    
     def select_all(self):
         """()
 
@@ -399,7 +396,7 @@ cdef class SpaceID(ObjectID):
         """
         H5Sselect_all(self.id)
 
-    @sync
+    
     def select_none(self):
         """()
 
@@ -407,7 +404,7 @@ cdef class SpaceID(ObjectID):
         """
         H5Sselect_none(self.id)
 
-    @sync
+    
     def select_valid(self):
         """() => BOOL
         
@@ -418,7 +415,7 @@ cdef class SpaceID(ObjectID):
 
     # === Point selection functions ===========================================
 
-    @sync
+    
     def get_select_elem_npoints(self):
         """() => LONG npoints
 
@@ -426,7 +423,7 @@ cdef class SpaceID(ObjectID):
         """
         return H5Sget_select_elem_npoints(self.id)
 
-    @sync
+    
     def get_select_elem_pointlist(self):
         """() => NDARRAY
 
@@ -445,7 +442,7 @@ cdef class SpaceID(ObjectID):
 
         return buf
 
-    @sync
+    
     def select_elements(self, object coords, int op=H5S_SELECT_SET):
         """(SEQUENCE coords, INT op=SELECT_SET)
 
@@ -483,7 +480,7 @@ cdef class SpaceID(ObjectID):
 
     # === Hyperslab selection functions =======================================
 
-    @sync
+    
     def get_select_hyper_nblocks(self):
         """() => LONG nblocks
 
@@ -491,7 +488,7 @@ cdef class SpaceID(ObjectID):
         """
         return H5Sget_select_hyper_nblocks(self.id)
 
-    @sync
+    
     def get_select_hyper_blocklist(self):
         """() => NDARRAY
 
@@ -518,7 +515,7 @@ cdef class SpaceID(ObjectID):
 
         return buf
 
-    @sync
+    
     def select_hyperslab(self, object start, object count, object stride=None, 
                          object block=None, int op=H5S_SELECT_SET):
         """(TUPLE start, TUPLE count, TUPLE stride=None, TUPLE block=None, 
diff --git a/h5py/h5t.pyx b/h5py/h5t.pyx
index 80a74c2..5f76522 100644
--- a/h5py/h5t.pyx
+++ b/h5py/h5t.pyx
@@ -21,7 +21,7 @@
 include "config.pxi"
 
 # Pyrex compile-time imports
-from h5 cimport init_hdf5, H5PYConfig, get_config, PHIL, get_phil
+from h5 cimport init_hdf5, H5PYConfig, get_config
 from h5p cimport PropID, pdefault
 from numpy cimport dtype, ndarray
 from python_string cimport PyString_FromStringAndSize
@@ -36,11 +36,8 @@ init_hdf5()
 # Runtime imports
 import sys
 import h5
-from _sync import sync, nosync
-
-cdef H5PYConfig cfg = get_config()
-cdef PHIL phil = get_phil()
-
+
+cdef H5PYConfig cfg = get_config()
 
 # === Custom C API ============================================================
 
@@ -210,7 +207,7 @@ cdef dict _sign_map  = { H5T_SGN_NONE: 'u', H5T_SGN_2: 'i' }
 
 # === General datatype operations =============================================
 
- at sync
+
 def create(int classtype, size_t size):
     """(INT classtype, UINT size) => TypeID
         
@@ -224,7 +221,7 @@ def create(int classtype, size_t size):
 
     return typewrap(H5Tcreate(<H5T_class_t>classtype, size))
 
- at sync
+
 def open(ObjectID group not None, char* name):
     """(ObjectID group, STRING name) => TypeID
 
@@ -232,7 +229,7 @@ def open(ObjectID group not None, char* name):
     """
     return typewrap(H5Topen(group.id, name))
 
- at sync
+
 def array_create(TypeID base not None, object dims_tpl):
     """(TypeID base, TUPLE dimensions) => TypeArrayID
 
@@ -253,7 +250,7 @@ def array_create(TypeID base not None, object dims_tpl):
     finally:
         efree(dims)
 
- at sync
+
 def enum_create(TypeID base not None):
     """(TypeID base) => TypeID
 
@@ -261,7 +258,7 @@ def enum_create(TypeID base not None):
     """
     return typewrap(H5Tenum_create(base.id))
 
- at sync
+
 def vlen_create(TypeID base not None):
     """(TypeID base) => TypeID
 
@@ -273,7 +270,7 @@ def vlen_create(TypeID base not None):
     return typewrap(H5Tvlen_create(base.id))
 
 IF H5PY_18API:
-    @sync
+    
     def decode(char* buf):
         """(STRING buf) => TypeID
 
@@ -336,7 +333,7 @@ cdef class TypeID(ObjectID):
         raise TypeError("No NumPy equivalent for %s exists" % self.__class__.__name__)
 
     IF H5PY_18API:
-        @sync
+        
         def commit(self, ObjectID group not None, char* name, PropID lcpl=None):
             """(ObjectID group, STRING name, PropID lcpl=None)
 
@@ -346,7 +343,7 @@ cdef class TypeID(ObjectID):
             H5Tcommit2(group.id, name, self.id, pdefault(lcpl),
                 H5P_DEFAULT, H5P_DEFAULT)
     ELSE:
-        @sync
+        
         def commit(self, ObjectID group not None, char* name):
             """(ObjectID group, STRING name)
 
@@ -354,7 +351,7 @@ cdef class TypeID(ObjectID):
             """
             H5Tcommit(group.id, name, self.id)
 
-    @sync
+    
     def committed(self):
         """() => BOOL is_comitted
 
@@ -362,7 +359,7 @@ cdef class TypeID(ObjectID):
         """
         return <bint>(H5Tcommitted(self.id))
 
-    @sync
+    
     def copy(self):
         """() => TypeID
 
@@ -370,7 +367,7 @@ cdef class TypeID(ObjectID):
         """
         return typewrap(H5Tcopy(self.id))
 
-    @sync
+    
     def equal(self, TypeID typeid):
         """(TypeID typeid) => BOOL
 
@@ -379,7 +376,7 @@ cdef class TypeID(ObjectID):
         """
         return <bint>(H5Tequal(self.id, typeid.id))
 
-    @sync
+    
     def lock(self):
         """()
 
@@ -389,7 +386,7 @@ cdef class TypeID(ObjectID):
         H5Tlock(self.id)
         self._locked = 1
 
-    @sync
+    
     def get_class(self):
         """() => INT classcode
 
@@ -397,7 +394,7 @@ cdef class TypeID(ObjectID):
         """
         return <int>H5Tget_class(self.id)
 
-    @sync
+    
     def set_size(self, size_t size):
         """(UINT size)
 
@@ -405,7 +402,7 @@ cdef class TypeID(ObjectID):
         """
         H5Tset_size(self.id, size)
 
-    @sync
+    
     def get_size(self):
         """ () => INT size
 
@@ -413,7 +410,7 @@ cdef class TypeID(ObjectID):
         """
         return H5Tget_size(self.id)
 
-    @sync
+    
     def get_super(self):
         """() => TypeID
 
@@ -421,7 +418,7 @@ cdef class TypeID(ObjectID):
         """
         return typewrap(H5Tget_super(self.id))
 
-    @sync
+    
     def detect_class(self, int classtype):
         """(INT classtype) => BOOL class_is_present
 
@@ -430,7 +427,7 @@ cdef class TypeID(ObjectID):
         """
         return <bint>(H5Tdetect_class(self.id, <H5T_class_t>classtype))
 
-    @sync
+    
     def _close(self):
         """()
 
@@ -443,7 +440,7 @@ cdef class TypeID(ObjectID):
             H5Tclose(self.id)
 
     IF H5PY_18API:
-        @sync
+        
         def encode(self):
             """() => STRING
 
@@ -470,7 +467,7 @@ cdef class TypeID(ObjectID):
         def __reduce__(self):
             return (type(self), (-1,), self.encode())
 
-        @sync
+        
         def __setstate__(self, char* state):
             self.id = H5Tdecode(<unsigned char*>state)
 
@@ -483,7 +480,7 @@ cdef class TypeArrayID(TypeID):
         Represents an array datatype
     """
 
-    @sync
+    
     def get_array_ndims(self):
         """() => INT rank
 
@@ -491,7 +488,7 @@ cdef class TypeArrayID(TypeID):
         """
         return H5Tget_array_ndims(self.id)
 
-    @sync
+    
     def get_array_dims(self):
         """() => TUPLE dimensions
 
@@ -526,7 +523,7 @@ cdef class TypeOpaqueID(TypeID):
         Represents an opaque type
     """
 
-    @sync
+    
     def set_tag(self, char* tag):
         """(STRING tag)
 
@@ -535,7 +532,7 @@ cdef class TypeOpaqueID(TypeID):
         """
         H5Tset_tag(self.id, tag)
 
-    @sync
+    
     def get_tag(self):
         """() => STRING tag
 
@@ -561,7 +558,7 @@ cdef class TypeStringID(TypeID):
         String datatypes, both fixed and vlen.
     """
 
-    @sync
+    
     def is_variable_str(self):
         """() => BOOL is_variable
 
@@ -569,7 +566,7 @@ cdef class TypeStringID(TypeID):
         """
         return <bint>(H5Tis_variable_str(self.id))
 
-    @sync
+    
     def get_cset(self):
         """() => INT character_set
 
@@ -577,7 +574,7 @@ cdef class TypeStringID(TypeID):
         """
         return <int>H5Tget_cset(self.id)
 
-    @sync
+    
     def set_cset(self, int cset):
         """(INT character_set)
 
@@ -585,7 +582,7 @@ cdef class TypeStringID(TypeID):
         """
         H5Tset_cset(self.id, <H5T_cset_t>cset)
 
-    @sync
+    
     def get_strpad(self):
         """() => INT padding_type
 
@@ -602,7 +599,7 @@ cdef class TypeStringID(TypeID):
         """
         return <int>H5Tget_strpad(self.id)
 
-    @sync
+    
     def set_strpad(self, int pad):
         """(INT pad)
 
@@ -670,7 +667,7 @@ cdef class TypeAtomicID(TypeID):
         Base class for atomic datatypes (float or integer)
     """
 
-    @sync
+    
     def get_order(self):
         """() => INT order
 
@@ -681,7 +678,7 @@ cdef class TypeAtomicID(TypeID):
         """
         return <int>H5Tget_order(self.id)
 
-    @sync
+    
     def set_order(self, int order):
         """(INT order)
 
@@ -692,7 +689,7 @@ cdef class TypeAtomicID(TypeID):
         """
         H5Tset_order(self.id, <H5T_order_t>order)
 
-    @sync
+    
     def get_precision(self):
         """() => UINT precision
 
@@ -700,7 +697,7 @@ cdef class TypeAtomicID(TypeID):
         """
         return H5Tget_precision(self.id)
 
-    @sync
+    
     def set_precision(self, size_t precision):
         """(UINT precision)
             
@@ -708,7 +705,7 @@ cdef class TypeAtomicID(TypeID):
         """
         H5Tset_precision(self.id, precision)
 
-    @sync
+    
     def get_offset(self):
         """() => INT offset
 
@@ -716,7 +713,7 @@ cdef class TypeAtomicID(TypeID):
         """
         return H5Tget_offset(self.id)
 
-    @sync
+    
     def set_offset(self, size_t offset):
         """(UINT offset)
 
@@ -724,7 +721,7 @@ cdef class TypeAtomicID(TypeID):
         """
         H5Tset_offset(self.id, offset)
 
-    @sync
+    
     def get_pad(self):
         """() => (INT lsb_pad_code, INT msb_pad_code)
 
@@ -739,7 +736,7 @@ cdef class TypeAtomicID(TypeID):
         H5Tget_pad(self.id, &lsb, &msb)
         return (<int>lsb, <int>msb)
 
-    @sync
+    
     def set_pad(self, int lsb, int msb):
         """(INT lsb_pad_code, INT msb_pad_code)
 
@@ -758,7 +755,7 @@ cdef class TypeIntegerID(TypeAtomicID):
         Integer atomic datatypes
     """
 
-    @sync
+    
     def get_sign(self):
         """() => INT sign
 
@@ -772,7 +769,7 @@ cdef class TypeIntegerID(TypeAtomicID):
         """
         return <int>H5Tget_sign(self.id)
 
-    @sync
+    
     def set_sign(self, int sign):
         """(INT sign)
 
@@ -798,7 +795,7 @@ cdef class TypeFloatID(TypeAtomicID):
         Floating-point atomic datatypes
     """
 
-    @sync
+    
     def get_fields(self):
         """() => TUPLE field_info
 
@@ -815,7 +812,7 @@ cdef class TypeFloatID(TypeAtomicID):
         H5Tget_fields(self.id, &spos, &epos, &esize, &mpos, &msize)
         return (spos, epos, esize, mpos, msize)
 
-    @sync
+    
     def set_fields(self, size_t spos, size_t epos, size_t esize, 
                           size_t mpos, size_t msize):
         """(UINT spos, UINT epos, UINT esize, UINT mpos, UINT msize)
@@ -825,7 +822,7 @@ cdef class TypeFloatID(TypeAtomicID):
         """
         H5Tset_fields(self.id, spos, epos, esize, mpos, msize)
 
-    @sync
+    
     def get_ebias(self):
         """() => UINT ebias
 
@@ -833,7 +830,7 @@ cdef class TypeFloatID(TypeAtomicID):
         """
         return H5Tget_ebias(self.id)
 
-    @sync
+    
     def set_ebias(self, size_t ebias):
         """(UINT ebias)
 
@@ -841,7 +838,7 @@ cdef class TypeFloatID(TypeAtomicID):
         """
         H5Tset_ebias(self.id, ebias)
 
-    @sync
+    
     def get_norm(self):
         """() => INT normalization_code
 
@@ -853,7 +850,7 @@ cdef class TypeFloatID(TypeAtomicID):
         """
         return <int>H5Tget_norm(self.id)
 
-    @sync
+    
     def set_norm(self, int norm):
         """(INT normalization_code)
 
@@ -865,7 +862,7 @@ cdef class TypeFloatID(TypeAtomicID):
         """
         H5Tset_norm(self.id, <H5T_norm_t>norm)
 
-    @sync
+    
     def get_inpad(self):
         """() => INT pad_code
 
@@ -877,7 +874,7 @@ cdef class TypeFloatID(TypeAtomicID):
         """
         return <int>H5Tget_inpad(self.id)
 
-    @sync
+    
     def set_inpad(self, int pad_code):
         """(INT pad_code)
 
@@ -903,7 +900,7 @@ cdef class TypeCompositeID(TypeID):
         Base class for enumerated and compound types.
     """
 
-    @sync
+    
     def get_nmembers(self):
         """() => INT number_of_members
 
@@ -911,7 +908,7 @@ cdef class TypeCompositeID(TypeID):
         """
         return H5Tget_nmembers(self.id)
 
-    @sync
+    
     def get_member_name(self, int member):
         """(INT member) => STRING name
         
@@ -933,7 +930,7 @@ cdef class TypeCompositeID(TypeID):
 
         return pyname
 
-    @sync
+    
     def get_member_index(self, char* name):
         """(STRING name) => INT index
 
@@ -950,7 +947,7 @@ cdef class TypeCompoundID(TypeCompositeID):
     """
 
 
-    @sync
+    
     def get_member_class(self, int member):
         """(INT member) => INT class
 
@@ -962,7 +959,7 @@ cdef class TypeCompoundID(TypeCompositeID):
         return H5Tget_member_class(self.id, member)
 
 
-    @sync
+    
     def get_member_offset(self, int member):
         """(INT member) => INT offset
 
@@ -973,7 +970,7 @@ cdef class TypeCompoundID(TypeCompositeID):
             raise ValueError("Member index must be non-negative.")
         return H5Tget_member_offset(self.id, member)
 
-    @sync
+    
     def get_member_type(self, int member):
         """(INT member) => TypeID
 
@@ -984,7 +981,7 @@ cdef class TypeCompoundID(TypeCompositeID):
             raise ValueError("Member index must be non-negative.")
         return typewrap(H5Tget_member_type(self.id, member))
 
-    @sync
+    
     def insert(self, char* name, size_t offset, TypeID field not None):
         """(STRING name, UINT offset, TypeID field)
 
@@ -994,7 +991,7 @@ cdef class TypeCompoundID(TypeCompositeID):
         """
         H5Tinsert(self.id, name, offset, field.id)
 
-    @sync
+    
     def pack(self):
         """()
 
@@ -1067,7 +1064,7 @@ cdef class TypeEnumID(TypeCompositeID):
         finally:
             H5Tclose(basetype)
 
-    @sync
+    
     def enum_insert(self, char* name, long long value):
         """(STRING name, INT/LONG value)
 
@@ -1082,7 +1079,7 @@ cdef class TypeEnumID(TypeCompositeID):
         self.enum_convert(&buf, 0)
         H5Tenum_insert(self.id, name, &buf)
 
-    @sync
+    
     def enum_nameof(self, long long value):
         """(LONG value) => STRING name
 
@@ -1101,7 +1098,7 @@ cdef class TypeEnumID(TypeCompositeID):
         retstring = name
         return retstring
 
-    @sync
+    
     def enum_valueof(self, char* name):
         """(STRING name) => LONG value
 
@@ -1113,7 +1110,7 @@ cdef class TypeEnumID(TypeCompositeID):
         self.enum_convert(&buf, 1)
         return buf
 
-    @sync
+    
     def get_member_value(self, int idx):
         """(UINT index) => LONG value
 
@@ -1346,69 +1343,64 @@ cpdef TypeID py_create(object dtype_in, bint logical=0):
     """
     cdef dtype dt = dtype(dtype_in)
     cdef char kind = dt.kind
+

+    # Float
+    if kind == c'f':
+        return _c_float(dt)
+    
+    # Integer
+    elif kind == c'u' or kind == c'i':
 
-    phil.acquire()
-    try:
-        # Float
-        if kind == c'f':
-            return _c_float(dt)
-        
-        # Integer
-        elif kind == c'u' or kind == c'i':
-
-            if logical:
-                # Check for an enumeration hint
-                enum_vals = py_get_enum(dt)
-                if enum_vals is not None:
-                    return _c_enum(dt, enum_vals)
+        if logical:
+            # Check for an enumeration hint
+            enum_vals = py_get_enum(dt)
+            if enum_vals is not None:
+                return _c_enum(dt, enum_vals)
 
-            return _c_int(dt)
+        return _c_int(dt)
 
-        # Complex
-        elif kind == c'c':
-            return _c_complex(dt)
+    # Complex
+    elif kind == c'c':
+        return _c_complex(dt)
 
-        # Compound
-        elif kind == c'V' and dt.names is not None:
-            return _c_compound(dt, logical)
+    # Compound
+    elif kind == c'V' and dt.names is not None:
+        return _c_compound(dt, logical)
 
-        # Array or opaque
-        elif kind == c'V':
-            if dt.subdtype is not None:
-                return _c_array(dt, logical)
-            else:
-                return _c_opaque(dt)
+    # Array or opaque
+    elif kind == c'V':
+        if dt.subdtype is not None:
+            return _c_array(dt, logical)
+        else:
+            return _c_opaque(dt)
 
-        # String
-        elif kind == c'S':
-            return _c_string(dt)
+    # String
+    elif kind == c'S':
+        return _c_string(dt)
 
-        # Boolean
-        elif kind == c'b':
-            return _c_bool(dt)
+    # Boolean
+    elif kind == c'b':
+        return _c_bool(dt)
 
-        # Object types (including those with vlen hints)
-        elif kind == c'O':
+    # Object types (including those with vlen hints)
+    elif kind == c'O':
 
-            if logical:
-                vlen = py_get_vlen(dt)
-                if vlen is not None:
-                    return _c_vlen_str(vlen)
+        if logical:
+            vlen = py_get_vlen(dt)
+            if vlen is not None:
+                return _c_vlen_str(vlen)
 
-                refcode = py_get_ref(dt)
-                if refcode is not None:
-                        return _c_ref(refcode)
+            refcode = py_get_ref(dt)
+            if refcode is not None:
+                    return _c_ref(refcode)
 
-                raise TypeError("Object dtype %r has no native HDF5 equivalent" % (dt,))
+            raise TypeError("Object dtype %r has no native HDF5 equivalent" % (dt,))
 
-            return PYTHON_OBJECT
+        return PYTHON_OBJECT
 
-        # Unrecognized
-        else:
-            raise TypeError("No conversion path for dtype: %s" % repr(dt))
-
-    finally:
-        phil.release()
+    # Unrecognized
+    else:
+        raise TypeError("No conversion path for dtype: %s" % repr(dt))
 
 cpdef dtype py_new_enum(object dt_in, dict enum_vals):
     """ (DTYPE dt_in, DICT enum_vals) => DTYPE
diff --git a/h5py/h5z.pyx b/h5py/h5z.pyx
index 3c28054..f3b47c9 100644
--- a/h5py/h5z.pyx
+++ b/h5py/h5z.pyx
@@ -22,9 +22,6 @@ from h5 cimport init_hdf5
 # Initialization
 init_hdf5()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === Public constants and data structures ====================================
 
 FILTER_LZF = H5PY_FILTER_LZF
@@ -63,7 +60,7 @@ NO_EDC      = H5Z_NO_EDC
 
 # === Filter API  =============================================================
 
- at sync
+
 def filter_avail(int filter_code):
     """(INT filter_code) => BOOL
 
@@ -77,7 +74,7 @@ def filter_avail(int filter_code):
     """
     return <bint>H5Zfilter_avail(<H5Z_filter_t>filter_code)
 
- at sync
+
 def get_filter_info(int filter_code):
     """(INT filter_code) => INT filter_flags
 
diff --git a/h5py/utils.pyx b/h5py/utils.pyx
index bead290..fdc9c17 100644
--- a/h5py/utils.pyx
+++ b/h5py/utils.pyx
@@ -28,9 +28,6 @@ from numpy cimport ndarray, import_array, \
 init_hdf5()
 import_array()
 
-# Runtime imports
-from _sync import sync, nosync
-
 # === Exception-aware memory allocation =======================================
 
 cdef void* emalloc(size_t size) except? NULL:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list