Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
why3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Why3
why3
Commits
5a5b51fd
Commit
5a5b51fd
authored
6 years ago
by
Pierre-Yves Strub
Committed by
MARCHE Claude
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
OCaml API for provers interruption.
parent
4c518b2d
No related branches found
No related tags found
1 merge request
!36
Resolve "Reloading should interrupt running provers"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/driver/call_provers.ml
+7
-2
7 additions, 2 deletions
src/driver/call_provers.ml
src/driver/call_provers.mli
+3
-2
3 additions, 2 deletions
src/driver/call_provers.mli
with
10 additions
and
4 deletions
src/driver/call_provers.ml
+
7
−
2
View file @
5a5b51fd
...
@@ -513,6 +513,13 @@ let query_call = function
...
@@ -513,6 +513,13 @@ let query_call = function
if
pid
=
0
then
NoUpdates
else
if
pid
=
0
then
NoUpdates
else
ProverFinished
(
editor_result
ret
)
ProverFinished
(
editor_result
ret
)
let
interrupt_call
=
function
|
ServerCall
id
->
Prove_client
.
send_interrupt
~
id
|
EditorCall
pid
->
(
try
Unix
.
kill
pid
Sys
.
sigkill
with
Unix
.
Unix_error
_
->
()
)
let
rec
wait_on_call
=
function
let
rec
wait_on_call
=
function
|
ServerCall
id
as
pc
->
|
ServerCall
id
as
pc
->
begin
match
query_result_buffer
id
with
begin
match
query_result_buffer
id
with
...
@@ -551,5 +558,3 @@ let call_editor ~command fin =
...
@@ -551,5 +558,3 @@ let call_editor ~command fin =
let
pid
=
Unix
.
create_process
exec
argarray
fd_in
Unix
.
stdout
Unix
.
stderr
in
let
pid
=
Unix
.
create_process
exec
argarray
fd_in
Unix
.
stdout
Unix
.
stderr
in
if
use_stdin
then
Unix
.
close
fd_in
;
if
use_stdin
then
Unix
.
close
fd_in
;
EditorCall
pid
EditorCall
pid
let
interrupt_call
id
=
Prove_client
.
send_interrupt
~
id
This diff is collapsed.
Click to expand it.
src/driver/call_provers.mli
+
3
−
2
View file @
5a5b51fd
...
@@ -177,7 +177,8 @@ val query_call : prover_call -> prover_update
...
@@ -177,7 +177,8 @@ val query_call : prover_call -> prover_update
(** non-blocking function that reports any new updates
(** non-blocking function that reports any new updates
from the server related to a given prover call. *)
from the server related to a given prover call. *)
val
interrupt_call
:
prover_call
->
unit
(** non-blocking function that asks for prover interruption *)
val
wait_on_call
:
prover_call
->
prover_result
val
wait_on_call
:
prover_call
->
prover_result
(** blocking function that waits until the prover finishes. *)
(** blocking function that waits until the prover finishes. *)
val
interrupt_call
:
int
->
unit
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment