pike.git / lib / modules / Thread.pmod

version» Context lines:

pike.git/lib/modules/Thread.pmod:1:   constant Mutex=__builtin.Mutex;   constant Condition=__builtin.Condition;      class Fifo { -  inherit Builtin.condition : r_cond; -  inherit Builtin.condition: w_cond; -  inherit Builtin.mutex: lock; +  inherit Condition : r_cond; +  inherit Condition: w_cond; +  inherit Mutex: lock;       mixed *buffer;    int r_ptr, w_ptr;       int size() { return (w_ptr+sizeof(buffer) - r_ptr) % sizeof(buffer); }       mixed read()    {    mixed tmp;    object key=lock::lock();
pike.git/lib/modules/Thread.pmod:31:    r_cond::signal();    }       varargs void create(int size)    {    buffer=allocate(size || 128);    }   };      class Queue { -  inherit Builtin.condition: r_cond; -  inherit Builtin.mutex: lock; +  inherit Condition: r_cond; +  inherit Mutex: lock;       mixed *buffer=allocate(16);    int r_ptr, w_ptr;       int size() { return w_ptr - r_ptr; }       mixed read()    {    mixed tmp;    object key=lock::lock();