Posted By: Rat (prilis mnoho her) on 'CZprogram' Title: Re: Windos threadsy Date: Fri Mar 19 16:26:49 2004 > > i Zdar, > > da se nejak zajistit, aby se mi pri ukonceni threadu vzdy zavolala nejaka > > funkce? Neco jako pthread_cleanup_push ... > > No muzes si udelat worker thread co bude cekat na handly tech ostatnich > threadu, budou signalovany pri ukonceni. Ale tohle ti pusti kod az pote co > ten > thread skonci, ne tesne pred nim. Mno, vzhledem k tomu, ze je to thread-specific var, tak je to docela problem ;) > > Pripadne, asi neexistuje nastaveni destruktoru pri TlsAlloc (ala > > pthread_key_create druhy parametr) ? > > No neni problem si napsat thread funkci co ti na konci neco zavola. Ruzny > frameworky (MFC, .Net, mozna i WTL) maj wrappery na thread ktery ti tohle > umoznej. Tak to zatim resim, nicmene je tu problem s tim, ze thread se muze ukoncit zum Beispiel tak, ze spadne ci zavola funkci pthread_exit/ExitThread apod. > Jerry III Krysa rat@atrey.karlin.mff.cuni.cz Jsem Krysa http://atrey.karlin.mff.cuni.cz/~rat/