The gemstone.util module


Yields results as they become available from asynchronous method calls.

Example usage

async_calls = [service.call_method_async("do_stuff", (x,)) for x in range(25)]

for async_call in gemstone.as_completed(*async_calls):
    print("just finished with result ", async_call.result())
Parameters:async_result_wrappersgemstone.client.structs.AsyncMethodCall instances.
Returns:a generator that yields items as soon they results become available.

New in version 0.5.0.


Dynamically loads a class or member of a class.

If module_or_member is something like "a.b.c", will perform from a.b import c.

If module_or_member is something like "a" will perform import a

Parameters:module_or_member – the name of a module or member of a module to import.
Returns:the returned entity, be it a module or member of a module.

Just like as_completed(), but returns only the first item and discards the rest.


New in version 0.5.0.