[fpc-devel] pthread scheduler attributes

Henry Vermaak henry.vermaak at gmail.com
Tue Dec 10 12:51:05 CET 2013


On Tue, Dec 10, 2013 at 12:27:00PM +0100, Michael Van Canneyt wrote:
> On Tue, 10 Dec 2013, Henry Vermaak wrote:
> 
> >Hello everyone
> >
> >Could anyone tell me why threads are set to not inherit scheduling
> >parameters from the calling thread?
> >
> >http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/unix/cthreads.pp?view=markup#l339
> 
> No particular reason. Probably because it tries to mimic windows behaviour.

I thought Windows threads always start with the same priority as the
process?

I also just noticed that this code probably leaks memory, since
pthread_attr_destroy() is never called for thread_attr.

Henry



More information about the fpc-devel mailing list