Reinhold Birkenfeld wrote:
[---]
>>How would I go about doing that in Python?
>
> I think you will want to create a threading.Lock object.
It would seem so. Thanks for the tip!
--
http://mail.python.org/mailman/listinfo/python-list
Jan Danielsson wrote:
> In OS/2 C, I would do this:
>
> main()
> {
> ...
> DosCreateMutexSem(NULL, &hmtx, 0UL, FALSE);
> ...
> }
>
> thread()
> {
> ...
> DosRequestMutexSem(hmtx);
>
> Locked!
>
> DosReleaseMutexSem(hmtx);
> ...
> }
>
> How would I go about doing that in Python?
I think you wi
In OS/2 C, I would do this:
main()
{
...
DosCreateMutexSem(NULL, &hmtx, 0UL, FALSE);
...
}
thread()
{
...
DosRequestMutexSem(hmtx);
Locked!
DosReleaseMutexSem(hmtx);
...
}
How would I go about doing that in Python?
I figured this part out:
lockobj = mutex()
lockobj.lock(foo, "bar")
Locked!