update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
15
Task/Program-termination/Aime/program-termination.aime
Normal file
15
Task/Program-termination/Aime/program-termination.aime
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
void
|
||||
f1(integer a)
|
||||
{
|
||||
if (a) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
integer
|
||||
main(void)
|
||||
{
|
||||
f1(3);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
% Implemented by Arjun Sunel
|
||||
if problem ->
|
||||
exit(1).
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
% Implemented by Arjun Sunel
|
||||
if problem ->
|
||||
halt().
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#lang racket
|
||||
(run-stuff)
|
||||
(when (something-bad-happened) (exit 1))
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#lang racket
|
||||
(parameterize ([current-custodian (make-custodian)])
|
||||
(define (loop) (printf "looping\n") (sleep 1) (loop))
|
||||
(thread loop) ; start a thread under the new custodian
|
||||
(sleep 5)
|
||||
;; kill it: this will kill the thread, and any other opened resources
|
||||
;; like file ports, network connections, etc
|
||||
(custodian-shutdown-all (current-custodian)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue