Re: parallel restore vs. windows

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: parallel restore vs. windows
Дата
Msg-id 493DEA96.3020603@dunslane.net
обсуждение исходный текст
Ответ на Re: parallel restore vs. windows  (Andrew Chernow <ac@esilo.com>)
Ответы Re: parallel restore vs. windows  (Andrew Chernow <ac@esilo.com>)
Список pgsql-hackers

Andrew Chernow wrote:
>
>>> HANDLE h = (HANDLE)_beginthreadex(NULL, 0, thread_start, arg, 0, NULL);
>>
>> This didn't give me any more joy, unfortunately. But you're right, I 
>> should be using it.
>>
>
> Are these threads sharing memory, intentionally or by mistake?


Things they write, and things they read but might not be stable, are not 
supposed to be shared. If they are it's a mistake.

>
>>> if(h)
>>>   CloseHandle(h);
>>
>> Umm, even if I wait on the handle using waitForMultipleObjects() ?
>>
>
> I was only trying to demonstrate that the value returned by 
> _beginthread can be managed/closed just like any other win32 HANDLE.
>
> > I am terminating the thread by returning from the thread function. I
> > understand this is the recommended way.
>
> I didn't see a CloseHandle on ret_child anywhere.  The HANDLE still 
> exists after the thread exists, you still have to call CloseHandle.

OK. I'll put that in after handling the return.

thanks

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Chernow
Дата:
Сообщение: Re: parallel restore vs. windows
Следующее
От: Andrew Chernow
Дата:
Сообщение: Re: parallel restore vs. windows