Am 30.11.2013 04:03, schrieb Alexey Kulentsov:

Hi all!

I have code with thread, counting some statistics and answering with current statistics info to any thread requesting it. Here is the code of statistics request:

protected string getCallInfo()
{
	send(statistTid, thisTid);
	return receiveOnly!string();
}

It worked using std.concurrency but I found here is no thisTid rewriting it to vibe.core.concurrency. So my question: how can I get current Task using vibe.core.concurrency? And is this possible to send it to another thread?
I checked already std.concurrency.thisTid in this example and got Error: static assert "Only objects with no unshared or unisolated aliasing may be sent, not Tid."

Task.getThis() should do the job. I'm currently not sure why I didn't
port thisTid, but if there is no specific reason, it will be added to
vibe.core.concurrency.