Re: Simple lock

2010-03-19 Thread Alf P. Steinbach
* MRAB: Gabriel Genellina wrote: En Fri, 19 Mar 2010 23:31:23 -0300, MRAB escribió: moerchendiser2k3 wrote: class SetPointer { private: void *ptr; MY_LOCK lock; public: void SetPointer(void *p) { Lock(this->lock); this->ptr = p; } 3. You're locking

Re: Simple lock

2010-03-19 Thread MRAB
Gabriel Genellina wrote: En Fri, 19 Mar 2010 23:31:23 -0300, MRAB escribió: moerchendiser2k3 wrote: class SetPointer { private: void *ptr; MY_LOCK lock; public: void SetPointer(void *p) { Lock(this->lock); this->ptr = p; } 3. You're locking, but nev

Re: Simple lock

2010-03-19 Thread Gabriel Genellina
En Fri, 19 Mar 2010 23:31:23 -0300, MRAB escribió: moerchendiser2k3 wrote: class SetPointer { private: void *ptr; MY_LOCK lock; public: void SetPointer(void *p) { Lock(this->lock); this->ptr = p; } 3. You're lockin

Re: Simple lock

2010-03-19 Thread MRAB
moerchendiser2k3 wrote: Hi, I have a common question about locks: class SetPointer { private: void *ptr; MY_LOCK lock; public: void SetPointer(void *p) { Lock(this->lock); this->ptr = p; } void *GetPointer()

Re: Simple lock

2010-03-19 Thread Chris Rebert
On Fri, Mar 19, 2010 at 6:58 PM, moerchendiser2k3 wrote: > > Thanks a lot!! Bye, moerchendiser2k3 This is the **Python** mailinglist/newsgroup; and your question isn't about Python. The C++ one is over there: http://groups.google.com/group/comp.lang.c++.moderated/topics Regards, Chris -- http

Re: Simple lock

2010-03-19 Thread Ben Finney
moerchendiser2k3 writes: > I have a common question about locks: You'd be best to ask in a forum related to the language you're using. This (‘comp.lang.python’) is a forum for users of the Python language. -- \ “If you can do no good, at least do no harm.” —_Slapstick_, | `\

Simple lock

2010-03-19 Thread moerchendiser2k3
Hi, I have a common question about locks: class SetPointer { private: void *ptr; MY_LOCK lock; public: void SetPointer(void *p) { Lock(this->lock); this->ptr = p; } void *GetPointer() { Loc