In [EMAIL PROTECTED], Chris Ashurst
wrote:
Hi, I'm coming in from a despised Java background, and I'm having some
trouble wrapping my head around sharing an object between multiple
instances of a single class (in simpler terms, I would say imagine a
simple chat server that has to share a
Chris Ashurst wrote:
Hi, I'm coming in from a despised Java background
Consider strongly the fact that Python supports multiple process
solutions well, so you're not stuck having to use multithreaded
solutions in every circumstance (but can still use them when necessary).
--
Chris Ashurst [EMAIL PROTECTED] writes:
Hi, I'm coming in from a despised Java background, and I'm having some
trouble wrapping my head around sharing an object between multiple
instances of a single class (in simpler terms, I would say imagine a
simple chat server that has to share a list of
Paul Rubin http://[EMAIL PROTECTED] writes:
# add the user to the connected user list, with timestamp and remote IP
status = request(user_list.append, self, time(), remote_ip=whatever)
Editing error, ignore the self, arg up there. Of course there may be
other mistakes too, I didn't test
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
You may want to make sure the lock will be released in case of an
exception:
def foo(self):
self.lock.aquire()
try:
pass # code
finally:
self.lock.release()
In Python 2.5 this can also be written more
Hi Chris,
Have you looked at the mutex module?
Jeremy
--
http://mail.python.org/mailman/listinfo/python-list
Hi, I'm coming in from a despised Java background, and I'm having some
trouble wrapping my head around sharing an object between multiple
instances of a single class (in simpler terms, I would say imagine a
simple chat server that has to share a list of connected users to each
instance of a