Ofer Gaatone
2008-05-26 12:27:05 UTC
Hi,
i'm using BCB 6 under Win2000. Trying to write a single in
multi-threaded environment i want to use double check.
this is my code:
if (pPrmt == NULL)
{
// lock
if (pPrmt == NULL)
pPrmt = new CPrmpt(pFileName);
// unlock
}
I don't know when and where should i create the semaphore that i will
use for lock and unlock ?
Any help, documents, example or link would be great
Thanks
Ofer
i'm using BCB 6 under Win2000. Trying to write a single in
multi-threaded environment i want to use double check.
this is my code:
if (pPrmt == NULL)
{
// lock
if (pPrmt == NULL)
pPrmt = new CPrmpt(pFileName);
// unlock
}
I don't know when and where should i create the semaphore that i will
use for lock and unlock ?
Any help, documents, example or link would be great
Thanks
Ofer