On Tue, 17 Mar 2015 07:33:16 +0100, Sönke Ludwig wrote:

Am 16.03.2015 um 20:20 schrieb zhmt:

I remove task.join, It works very well.

I noticed that a lot of code of have changed 4 days ago, thanks for excellent work of vibe.d .

There was indeed an issue when Task.join() was called from outside of
a task. I've fixed that now, so that this works again, too:

shared static this()
{
	auto wtask = runTask({
		writeln("sttt.d");
	});
	wtask.join(); // works now as expected
}

OK, Thank you very much.

But I got another problem now, the fixed code works well on mac or linux , but crashes soon on windows, here is the call stack, I hope you can help again, thanks in advance:

Task terminated with unhandled exception: Acquiring reader of already owned connection.
core.exception.AssertError@..\vibe.d-inter_task_fixes\source\vibe\core\drivers\libevent2_tcp.d(373): Acquiring reader of already owned connection.
----------------
0x005557E5 in _d_assert_msg
0x004C5D79 in bool vibe.core.drivers.libevent2_tcp.Libevent2TCPConnection.waitForData(core.time.Duration) at C:\dwork\ezsock\..\vibe.d-inter_task_fixes\source\vibe\core\drivers\libevent2_tcp.d(282)
0x00437258 in int ezsockacount.NetUtil.NetUtil.readSome(vibe.core.net.TCPConnection, ubyte[]) at C:\dwork\ezsock\source\ezsockacount\NetUtil.d(112)
0x0043841E in D12ezsockacount19SpeedLimitForwarder19SpeedLimitForwarder7forwardMFC4vibe4core3net13TCPConnection at C:\dwork\ezsock\source\ezsockacount\SpeedLimitForwarder.d(61)
0x004382E3 in D12ezsockacount19SpeedLimitForwarder19SpeedLimitForwarder10tryForwardMFC4vibe4core3net13TCPConnectionC4vibe4core3net13TCPConnectionZ9__lambda3 at
C:\dwork\ezsock\source\ezsockacount\SpeedLimitForwarder.d(35)
0x00412ADE in void vibe.core.core.makeTaskFuncInfo!(void delegate()).makeTaskFuncInfo(ref void delegate()).callDelegate(vibe.core.core.TaskFuncInfo*) at C:\dwork\ezsock\..\vibe.d-inter_task_fixes\source\vibe\core\core.d(464)
0x00467FE7 in void vibe.core.core.CoreTask.run() at C:\dwork\ezsock\..\vibe.d-inter_task_fixes\source\vibe\core\core.d(967)
0x0056A635 in void core.thread.Fiber.run()
There are still tasks running at exit.