mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 12:35:05 +02:00
Added notes
This commit is contained in:
parent
c773af78fb
commit
f3fac78e35
1 changed files with 13 additions and 0 deletions
13
runtime.c
13
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.
|
// 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
|
// Then can use a new function up there to add the mutator, since we
|
||||||
// already have the number.
|
// 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_t thread;
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
pthread_attr_init(&attr);
|
pthread_attr_init(&attr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue