Sha256: 6219f81f1bfb6c1ce86ff1ee13792fc43f4cc50048f45f414278237dcc347f8d
Contents?: true
Size: 901 Bytes
Versions: 85
Compression:
Stored size: 901 Bytes
Contents
//Support for the telepathy protocol tel_idx = 3; //Global table linking telepointers to objects (like functions) tel_table = {}; //This function creates N telepathic pointers and returns the starting index //of the first pointer returned. Successive pointers are just increments //of the base value by one. Should be used as much as possible as it //reduces the communication overhead (by allowing pipelining on futures), //and prevents native pointers from entering the system (which allows more //interesting abstractions like slaves) function tels(n) { var o = tel_idx; tel_idx += n; return o; } function tel_reg(e) { var tp = tels(1); tel_table[tp] = e; return tp; } function tel_reg_ptr(e, tp) { tel_table[tp] = e; } function tel_del(tp) { delete tel_table[tp]; } function tel_deref(tp) { return tel_table[tp]; } function tel_exists(tp) { return tp in tel_table; }
Version data entries
85 entries across 85 versions & 1 rubygems