[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How are the object_ids generated/assigned to objects?

Pavel Smerk

8/25/2006 3:37:00 PM

Hello,

assume some multithreaded application, thread1 starts and finishes, then
thread2 starts --- how is the possibility that these two threads will
have the same object_id? On what it depends?

Thanks,

P.
6 Answers

Alex Young

8/25/2006 4:03:00 PM

0

Pavel Smerk wrote:
> Hello,
>
> assume some multithreaded application, thread1 starts and finishes, then
> thread2 starts --- how is the possibility that these two threads will
> have the same object_id? On what it depends?
If the first thread has stopped and been garbage collected, its
object_id will be available for reuse, and it is perfectly possible for
another thread to get it assigned on creation.

--
Alex

Ara.T.Howard

8/25/2006 4:07:00 PM

0

Timothy Goddard

8/27/2006 12:59:00 AM

0

Treat it as undefined. No two objects live at the same time will have
the same object id. That is the only guarantee.

Pavel Smerk wrote:
> Hello,
>
> assume some multithreaded application, thread1 starts and finishes, then
> thread2 starts --- how is the possibility that these two threads will
> have the same object_id? On what it depends?
>
> Thanks,
>
> P.

Moder@tor

9/27/2011 5:33:00 PM

0

On Tue, 27 Sep 2011 10:16:05 -0700, Old Baye <ob@in.valid> wrote:

But can you dance while you bark, Spammy?

http://www.hollywoodstarshoney.com/wp-content/uploads/2010/03/chihuahu...

Of course!

I own you. Sit up and bark for
us, Spammy.

Photoshopped, photoshopped, photoshopped, photoshopped, photoshopped,
photoshopped, photoshopped, photoshopped, photoshopped, photoshopped,
photoshopped, photoshopped, photoshopped, photoshopped, photoshopped,
photoshopped, photoshopped, photoshopped, photoshopped, photoshopped.

Are you listening, Spammy?

Old Baye

9/27/2011 5:35:00 PM

0

On 9/27/2011 10:33 AM, Moder@tor wrote:
> On Tue, 27 Sep 2011 10:15:50 -0700, Old Baye<ob@in.valid> wrote:
>
> But can you dance

It's highly amusing watching your tantrum.

Old Baye

9/27/2011 5:35:00 PM

0

On 9/27/2011 10:33 AM, Moder@tor wrote:
> On Tue, 27 Sep 2011 10:16:05 -0700, Old Baye<ob@in.valid> wrote:
>
> But can you dance while you bark,

But can you foam while you OCD?