Skip to content

Commit 91fbe07

Browse files
committed
fiber_entryPoint() is noreturn
1 parent ab57e77 commit 91fbe07

File tree

1 file changed

+3
-1
lines changed
  • druntime/src/core/thread/fiber

1 file changed

+3
-1
lines changed

druntime/src/core/thread/fiber/base.d

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ package
2727
import core.exception : onOutOfMemoryError;
2828
import core.stdc.stdlib : abort;
2929

30-
extern (C) void fiber_entryPoint() nothrow
30+
extern (C) noreturn fiber_entryPoint() nothrow
3131
{
3232
FiberBase obj = FiberBase.getThis();
3333
assert( obj );
@@ -51,6 +51,8 @@ package
5151

5252
obj.m_state = Fiber.State.TERM;
5353
obj.switchOut();
54+
55+
assert(false, "It is impossible to return from switchOut");
5456
}
5557
}
5658

0 commit comments

Comments
 (0)