Re: getTid wrapper

2014-03-04 Thread Timothee Cour
On Tue, Mar 4, 2014 at 10:09 AM, Timothee Cour wrote: > Thanks, that works > does it make sense to add a function to do that? > as it stands there are 2 separate ways, cast(void*)Thread.getThis and > cast(void*)getTid, so having a function would make it the preferred way. > > sorry that should be

Re: getTid wrapper

2014-03-04 Thread Ali Çehreli
On 03/04/2014 08:27 AM, Stanislav Blinov wrote: > Perhaps that book section is indeed not clear > enough. &thisTid actually gets an address of 'thisTid', > which is (at least in current implementation) a function. Makes sense. I remember thisTid being a module-level variable at the time I wrote

Re: getTid wrapper

2014-03-04 Thread Stanislav Blinov
On Tuesday, 4 March 2014 at 15:52:37 UTC, Timothee Cour wrote: quoting from there: "The type of thisTid is Tid, but its value has no significance for the program. Further, both threads report it to be surprisingly at the same address: Owner : Tid(std.concurrency.MessageBox), address: 809C360

Re: getTid wrapper

2014-03-03 Thread Bienlein
On Tuesday, 4 March 2014 at 06:31:24 UTC, Timothee Cour wrote: that gives tid of spawned thread, not 'self'. The link you mentioned says it is stored in the special variable thisTid.