Przemyslaw, ok thanks, I did not look into thfuncx! :), that said, it does not need to be inside
while ::active enddo loop, since, in case the code is executed several times, the thread object executing it is always the same, am I right? Maurilio. Przemysław Czerpak wrote: > On Tue, 23 Feb 2010, Maurilio Longo wrote: > > Hi, > >> there is a call to >> ThreadObject( Self ) >> inside ::start() method of tthread class, is it needed? What does it really >> does given that the result is thrown away? > > Look at ThreadObject() implementation in thfuncx.prg. > It sets value which is later returned by ThreadObject() function. > If you find it more clear then you can divide current ThreadObject() > function into two different functions: > > THREAD STATIC t_oThread > > FUNCTION ThreadObject() > RETURN t_oThread > > FUNCTION __SetThreadObject( oThread ) > IF PCount() > 0 > t_oThread := oThread > ENDIF > RETURN NIL > > or move above ThreadObject() function and 'THREAD STATIC t_oThread' to > tthreadx.prg and replace: > ThreadObject( Self ) > with: > t_oThread := oThread > > best regards, > Przemek > _______________________________________________ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour > -- __________ | | | |__| Maurilio Longo |_|_|_|____| farmaconsult s.r.l. _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour