Threadsafe
safe_add(kosh_obj, add_obj)
A threadsafe version of Kosh's "add" method.
Parameters:
kosh_obj: kosh object A kosh object. add_obj: kosh object A kosh object to add to kosh_obj.
Returns:
object: The result of calling kosh_obj.add(add_obj)
Source code in kosh/threadsafe.py
safe_associate(dataset, **kw_args)
A threadsafe version of Kosh's "associate" method.
Parameters:
dataset: Kosh dataset A kosh dataset that has the "associate" method.
Returns:
object: The result of calling dataset.associate(**kw_args)
Source code in kosh/threadsafe.py
safe_clone(kosh_obj, **kw_args)
A threadsafe version of Kosh's "clone" method.
Parameters:
kosh_obj: kosh object A kosh object.
Returns:
object: The result of calling kosh_obj.clone(**kw_args)
Source code in kosh/threadsafe.py
safe_create(kosh_obj, **kw_args)
A threadsafe version of Kosh's "create" method.
Parameters:
kosh_obj: object A kosh object that has the "create" method.
Returns:
object: The result of calling kosh_obj.create(**kw_args)
Source code in kosh/threadsafe.py
safe_create_ensemble(store, **kw_args)
A threadsafe version of Kosh's "create_ensemble" method.
Parameters:
store: Kosh store A kosh store that has the "create_ensemble" method.
Returns:
object: The result of calling store.create_ensemble(**kw_args)
Source code in kosh/threadsafe.py
safe_delete(kosh_obj, del_object)
A threadsafe version of Kosh's "delete" method.
Parameters:
kosh_obj: object A kosh object that has the "delete" method. del_object: object The kosh object to delete.
Returns:
object: The result of calling kosh_obj.delete(del_object)
Source code in kosh/threadsafe.py
safe_find(kosh_obj, **kw_args)
A threadsafe version of Kosh's "find" method.
IMPORTANT: Kosh's "find" methods return generators that don't perform database communications until the generator is executed. This means that we need to execute the generator inside of our threadsafe wrapper. This converts the return value to an iterator to conserve the return value interface. Note that this will have a small impact on performance, but it shouldn't be significant.
Parameters:
kosh_obj: kosh object A kosh object.
Returns:
object: The result of calling kosh_obj.find(**kw_args)
Source code in kosh/threadsafe.py
safe_find_datasets(ensemble, **kw_args)
A threadsafe version of Kosh's "find_datasets" method.
IMPORTANT: Kosh's "find" methods return generators that don't perform database communications until the generator is executed. This means that we need to execute the generator inside of our threadsafe wrapper. This converts the return value to an iterator to conserve the return value interface. Note that this will have a small impact on performance, but it shouldn't be significant.
Parameters:
ensemble: kosh ensemble A kosh ensemble.
Returns:
object: The result of calling ensemble.find_datasets(**kw_args)
Source code in kosh/threadsafe.py
safe_find_ensembles(store, **kw_args)
A threadsafe version of Kosh's "find_ensembles" method.
IMPORTANT: Kosh's "find" methods return generators that don't perform database communications until the generator is executed. This means that we need to execute the generator inside of our threadsafe wrapper. This converts the return value to an iterator to conserve the return value interface. Note that this will have a small impact on performance, but it shouldn't be significant.
Parameters:
store: kosh store A kosh store.
Returns:
object: The result of calling store.find_ensembles(**kw_args)
Source code in kosh/threadsafe.py
safe_get_execution_graph(dataset, **kw_args)
A threadsafe version of Kosh's "get_execution_graph" method.
Parameters:
dataset: Kosh dataset A kosh dataset that has the "get_execution_graph" method.
Returns:
object: The result of calling dataset.get_execution_graph(**kw_args)
Source code in kosh/threadsafe.py
safe_kosh_get(kosh_obj, *args, **kw_args)
A threadsafe version of Kosh's "get" method.
Parameters:
kosh_obj: kosh object A kosh object.
Returns:
object: The result of calling kosh_obj.get(**kw_args)
Source code in kosh/threadsafe.py
safe_open(store, *args, **kw_args)
A threadsafe version of Kosh's "open" method.
Parameters:
store: Kosh store A kosh store that has the "open" method.
Returns:
object: The result of calling store.open(args, *kw_args)