Kent Johnson wrote:
Shitiz Bansal wrote:
In the code you have shown, I don't see any need for
the queue. Just create the thread and start it. I don't think you
have to keep a reference to it.
I'm not sure, but I think the thread will be garbage collected when
it completes. (Can anyone
else confi
--- Danny Yoo <[EMAIL PROTECTED]> wrote:
> Ok, this makes sense. Each passenger thread needs
> to know about the
> queue, because that's the place you want the
> passenger to drop out of.
>
> Lists support a 'remove()' method, so you may be
> able to use it.
Does it operate like queue.remove(s
Shitiz Bansal wrote:
In the code you have shown, I don't see any need for
the queue. Just create the thread and start it.
I don't think you have to keep a reference to it.
I'm not sure, but I think the thread will be
garbage collected when it completes. (Can anyone
else confirm this?)
This does
> --- Danny Yoo <[EMAIL PROTECTED]> wrote:
>
> > Ok, this makes sense. Each passenger thread needs to know about the
> > queue, because that's the place you want the passenger to drop out of.
> >
> > Lists support a 'remove()' method, so you may be able to use it.
>
> Does it operate like queue.
> In the code you have shown, I don't see any need for
> the queue. Just create the thread and start it.
> I don't think you have to keep a reference to it.
> I'm not sure, but I think the thread will be
> garbage collected when it completes. (Can anyone
> else confirm this?)
This does make se
Shitiz Bansal wrote:
No, this list is not a linked list.
Since mu original code is rather huge, I am presenting
the relevant snippet.
queue=[]
def genpassenger(num,destination,queue=queue):
for i in range(num):
newpass=passenger(destination)
queue.append(newpass)
newpass
On Wed, 16 Mar 2005, Shitiz Bansal wrote:
> No, this list is not a linked list.
> Since mu original code is rather huge, I am presenting
> the relevant snippet.
> queue=[]
> def genpassenger(num,destination,queue=queue):
> for i in range(num):
> newpass=passenger(destination)
>
No, this list is not a linked list.
Since mu original code is rather huge, I am presenting
the relevant snippet.
queue=[]
def genpassenger(num,destination,queue=queue):
for i in range(num):
newpass=passenger(destination)
queue.append(newpass)
newpass.start()
class passen
Shitiz Bansal wrote:
Hi,
How do i delete a class instance in a function running
within itself?
All the instances of the class are stored in a list,
and they need to be deleted after executing their
function.
However since the list is dynamic, there is no way to
know the exact position of the instan
Hi,
How do i delete a class instance in a function running
within itself?
All the instances of the class are stored in a list,
and they need to be deleted after executing their
function.
However since the list is dynamic, there is no way to
know the exact position of the instance within the
list.
10 matches
Mail list logo