-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce the Thread.Exit exception (#10951)
This provides an alternative to Thread.exit for terminating the current thread. In 5.00, Thread.exit is deprecated, and raising Thread.Exit is the standard way to terminate threads prematurely.
- Loading branch information
1 parent
db915bd
commit 3ff3fcc
Showing
6 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
testsuite/tests/lib-threads/uncaught_exception_handler.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
Thread 1 killed on uncaught exception Uncaught_exception_handler.CallbackExn | ||
Raised at Uncaught_exception_handler.fn in file "uncaught_exception_handler.ml", line 28, characters 12-113 | ||
Called from Thread.create.(fun) in file "thread.ml", line 47, characters 8-14 | ||
Called from Thread.create.(fun) in file "thread.ml", line 49, characters 8-14 | ||
[thread 2] caught Uncaught_exception_handler.CallbackExn | ||
Raised at Uncaught_exception_handler.fn in file "uncaught_exception_handler.ml", line 28, characters 12-113 | ||
Called from Thread.create.(fun) in file "thread.ml", line 47, characters 8-14 | ||
Called from Thread.create.(fun) in file "thread.ml", line 49, characters 8-14 | ||
Thread 2 killed on uncaught exception Uncaught_exception_handler.CallbackExn | ||
Raised at Uncaught_exception_handler.fn in file "uncaught_exception_handler.ml", line 28, characters 12-113 | ||
Called from Thread.create.(fun) in file "thread.ml", line 47, characters 8-14 | ||
Called from Thread.create.(fun) in file "thread.ml", line 49, characters 8-14 | ||
Thread 2 uncaught exception handler raised Uncaught_exception_handler.UncaughtHandlerExn | ||
Raised at Uncaught_exception_handler.handler in file "uncaught_exception_handler.ml", line 26, characters 2-26 | ||
Called from Thread.create.(fun) in file "thread.ml", line 53, characters 10-41 | ||
Raised at Uncaught_exception_handler.handler in file "uncaught_exception_handler.ml", line 26, characters 2-17 | ||
Called from Thread.create.(fun) in file "thread.ml", line 58, characters 10-41 | ||
[thread 3] caught Uncaught_exception_handler.CallbackExn | ||
Raised at Uncaught_exception_handler.fn in file "uncaught_exception_handler.ml", line 28, characters 12-113 | ||
Called from Thread.create.(fun) in file "thread.ml", line 49, characters 8-14 |