diff --git a/runtime.c b/runtime.c index 21bf948d..d695abbe 100644 --- a/runtime.c +++ b/runtime.c @@ -3157,6 +3157,19 @@ object Cyc_spawn_thread(object thunk) // here. will need to pass it, along with thunk, to Cyc_init_thread. // Then can use a new function up there to add the mutator, since we // already have the number. +/* +how to manage gc mutators. need to handle: +- need to be able to allocate a thread but not run it yet. + maybe have a run level, or status +- need to make mutators thread safe, ideally without major performance impacts +- thread terminates + - should mark mutator as 'done' + - at an opportune moment, free mutator and set it back + to null + +what is the right data structure? is the array OK? or would it be better +to look at the lock-free structures provided by ck? +*/ pthread_t thread; pthread_attr_t attr; pthread_attr_init(&attr);