/
CHANGELOG
17 lines (14 loc) · 1.17 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
In this new version of Lace, it is no longer possible to use the current thread as a Lace thread.
Instead, lace_start starts the worker threads, lace_stop stops the worker threads.
Then use RUN(...) to run a Lace task from outside Lace.
Only use LACE_ME and CALL macros from inside a Lace thread, i.e., if you are running deep inside some Lace task.init
To use Lace:
- make new tasks like in the benchmark examples: VOID_TASK_n for tasks that don't return values and have n parameters, and TASK_n otherwise
- you can separate the TASK_DECL_n for header files and TASK_IMPL_n for implementation files if you want that
- to have Lace run a Lace task, use RUN(taskname, param1, param2, ...)
- if RUN is used from a Lace thread, this is detected and the Lace thread runs the task
- when using RUN, the current thread halts until the task is completed
- use macros SPAWN, SYNC, CALL from inside a Lace task to spawn/sync/call other Lace tasks
- if you are in a Lace worker thread but not a Lace task, use LACE_ME before using SPAWN/SYNC/CALL
- use lace_suspend and lace_resume to temporarily halt Lace workers
- use lace_stop (not while threads are suspended) to end Lace workers and reclaim memory