Did I find the right examples for you? yes no

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/c/i/ciel-HEAD/src/python/ciel/runtime/master/lazy_task_pool.py   ciel(Download)
from ciel.public.references import SW2_FutureReference, \
    SWErrorReference, combine_references, SW2_StreamReference
from ciel.runtime.task import TASK_CREATED, TASK_BLOCKING, TASK_RUNNABLE, \
    TASK_COMMITTED, build_taskpool_task_from_descriptor, TASK_QUEUED, TASK_FAILED, TASK_QUEUED_STREAMING
from threading import Lock
    def task_completed(self, task, commit_bindings, should_publish=True):
        task.set_state(TASK_COMMITTED)
 
        # Need to notify all of the consumers, which may make other tasks
        # runnable.
 
                    # The producing task is inactive, so recursively visit it.                    
                    if producing_task.state in (TASK_CREATED, TASK_COMMITTED):
                        producing_task.set_state(TASK_BLOCKING)
                        newly_active_task_queue.append(producing_task)

src/c/i/ciel-HEAD/src/python/ciel/runtime/master/job_pool.py   ciel(Download)
from cherrypy.process import plugins
from ciel.public.references import SWReferenceJSONEncoder
from ciel.runtime.task import TASK_STATES, TASK_STATE_NAMES, \
    build_taskpool_task_from_descriptor, TASK_QUEUED, TASK_FAILED,\
    TASK_COMMITTED, TASK_QUEUED_STREAMING
    def select_workers_for_task(self, task):
        constrained_location = task.get_constrained_location()
        if constrained_location is not None:
            return [self.job_pool.worker_pool.get_worker_at_netloc(constrained_location)]
        elif task.state in (TASK_QUEUED_STREAMING, TASK_QUEUED, TASK_COMMITTED):
                    (spawned, published, profiling) = payload
                    parent_task.set_profiling(profiling)
                    parent_task.set_state(TASK_COMMITTED)
                    self.record_task_stats(parent_task, worker)
                    for child in spawned:

src/c/i/ciel-HEAD/src/python/ciel/runtime/task_graph.py   ciel(Download)
from ciel.public.references import SW2_FutureReference, combine_references,\
    SW2_StreamReference
from ciel.runtime.task import TASK_CREATED, TASK_BLOCKING, TASK_COMMITTED,\
    TASK_RUNNABLE
import collections
                    if producing_task is not None:
                        # The producing task is inactive, so recursively visit it.                    
                        if producing_task.state in (TASK_CREATED, TASK_COMMITTED):
                            producing_task.set_state(TASK_BLOCKING)
                            newly_active_task_queue.append(producing_task)