Wednesday, January 23, 2008

Thread Tweaks (SVN 0.38)

I did some work the thread component to make it more self manageable. It allows to use it by just creating threads using CoreThreadNew and calling CoreThreadProcess which returns when every thread has finished. I also added support for a parameter to be passed to the thread function. I think this is one of the easiest API's for using threads.

#include "CoreThread.h"

void main() {

CoreThreadNew(thread1, NULL);

CoreThreadNew(thread2, NULL);

CoreThreadProcess();

}

I hope the implementation will be compatible with PalmOS when I port the thread component.

No comments: