Re: [AD] public thread API

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, 2008-08-06 at 00:03 +1000, Peter Wang wrote:
> Hi, 
> 
> A couple of weeks (months) ago there was a re-suggestion to expose a
> thread API.  At that time I started writing down the docs for such a
> thing then forgot about it.  Here it is, in source and rendered HTML.
> 
> I think I was the only one who had objections to including a thread API,
> so whoever feels like working on this should go right ahead.
> The internal API mostly matches this already.

Yeah. I can commit a file with the public wrapper functions and a
test/example later today, unless it will take more than an hour or so to
write it.

> * initialisation functions take preallocated objects; should they
>   allocate on the heap and return pointers instead?

For consistency with the rest of the API, I'd say yes.

> * I didn't stray from the pthreads word order; should we?
> 

word order?

One thing I'm wondering now, if we use the malloc/free way instead of
preallocation, should we provide a separate
al_thread_create/al_thread_destroy to do the allocation, and rename the
current al_thead_create to al_thread_start?

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/