better organising coll's comment
@@ -2084,26 +2084,20 @@ static void *coll_new(t_symbol *s, int argc, t_atom *argv)
if (file == NULL)
file = &s_;
- // prep threading stuff
x->unsafe = 0;
x->init = 0;
- //used to be only for threaded, now make it anyways
- //needed for bang on instantiate - DK
+ //lines below used to be only for threaded, but it's
+ //needed for bang on the 3rd outlet - DK & Porres
x->x_clock = clock_new(x, (t_method)coll_tick);
-// if (x->x_threaded == 1) - there's something here that needs to be done in instantiating the object
- // even for unthreaded mode, otherwise it won't bang on the 3rd outlet when in threaded mode... porres
- {
- //x->x_clock = clock_new(x, (t_method)coll_tick);
t_threadedFunctionParams rPars;
rPars.x = x;
pthread_mutex_init(&x->unsafe_mutex, NULL);
pthread_cond_init(&x->unsafe_cond, NULL);
ret = pthread_create( &x->unsafe_t, NULL, (void *) &coll_threaded_fileio, (void *) &rPars);
-
while (!x->init){
sched_yield();
}
- }
+
coll_bind(x, file);
coll_flags(x, (int)embed, 0);
@@ -2134,7 +2128,6 @@ void coll_setup(void)
gensym("insert2"), A_GIMME, 0);
class_addmethod(coll_class, (t_method)coll_remove,
gensym("remove"), A_GIMME, 0);
-
class_addmethod(coll_class, (t_method)coll_delete,
gensym("delete"), A_GIMME, 0);
class_addmethod(coll_class, (t_method)coll_assoc,
