Added notes

This commit is contained in:
Justin Ethier 2015-12-17 23:00:38 -05:00
parent c773af78fb
commit f3fac78e35

View file

@ -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);