how does one go about getting the thread id from within the thread
itself?
i'm aware that Thread.list returns an array of thread objects (running
or stopped), i was looking for a way of identifying which object id
belonged to which thread...
how does one go about getting the thread id from within the thread
itself?
i'm aware that Thread.list returns an array of thread objects (running
or stopped), i was looking for a way of identifying which object id
belonged to which thread...
Thread.current will tell the current thread id.
Also Thread.main will give you the main thread, and
Thread.list will give you all of them.