view src/parallel_execution/Queue.cbc @ 361:a2c01ab30ea2

Add synchronized queue of paper
author Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
date Wed, 28 Jun 2017 05:48:39 +0900
parents fd470e090403
children fb50cf8aa615
line wrap: on
line source

typedef struct Queue<Impl>{
        union Data* queue;
        union Data* data;
        __code whenEmpty(...);
        __code clear(Impl* queue, __code next(...));
        __code put(Impl* queue, union Data* data, __code next(...));
        __code take(Impl* queue, __code next(union Data*, ...));
        __code isEmpty(Impl* queue, __code next(...), __code whenEmpty(...));
        __code next(...);
} Queue;