Skip to content

Commit cf30c01

Browse files
committed
Remove Fake_preempt
1 parent 692707f commit cf30c01

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ full_pwd=`pwd`
107107

108108
## Which options exist? eoptions for enable/disable, woptions for with/without:
109109
eoptions="debug annot natdynlink"
110-
woptions="pgsql sqlite dbm camlzip preempt"
110+
woptions="pgsql sqlite dbm camlzip"
111111

112112
print_options () {
113113
for opt in $eoptions; do

src/baselib/Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ else
5858
NATIVECODE_RUNTIME_DETECT=false
5959
endif
6060

61-
ifeq "$(PREEMPTIVE)" "YES"
62-
PREEMTIMPLEM=Lwt_preemptive
63-
else
64-
PREEMTIMPLEM=Fake_preempt
65-
endif
66-
6761
VERSION := $(shell head -n 1 ../../VERSION)
6862

6963
ocsigen_config.ml: ocsigen_config.ml.in ../../Makefile.config ../../Makefile.options ../../VERSION
@@ -81,7 +75,6 @@ ocsigen_config.ml: ocsigen_config.ml.in ../../Makefile.config ../../Makefile.opt
8175
| sed s%_PROJECTNAME_%$(PROJECTNAME)%g \
8276
| sed s%_COMMANDPIPE_%$(COMMANDPIPE)%g \
8377
| sed s%_CONFIGDIR_%$(CONFIGDIR)% \
84-
| sed s%_PREEMTIMPLEM_%$(PREEMTIMPLEM)% \
8578
| sed s%_ISNATIVE_%$(NATIVECODE_RUNTIME_DETECT)%g \
8679
| sed "s%_DEPS_%$(INITPACKAGE)%g" \
8780
> ocsigen_config.ml

src/baselib/ocsigen_config.ml.in

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ let native_ext = if is_native then ".opt" else ""
3838
let builtin_packages =
3939
List.fold_left (fun a s -> String.Set.add s a) String.Set.empty [_DEPS_]
4040

41-
module Fake_preempt =
42-
struct
43-
let set_max_number_of_threads_queued : int -> unit = fun _ -> ()
44-
let get_max_number_of_threads_queued : unit -> int = fun () -> 0
45-
let init : int -> int -> (string -> unit) -> unit = fun _ _ _ -> ()
46-
end
47-
4841
(* Server config: *)
4942
let (uploaddir : string option ref) = ref None
5043
let logdir = ref (Some ("_LOGDIR_"))
@@ -97,7 +90,7 @@ let set_veryverbose () =
9790
let set_minthreads i = minthreads := i
9891
let set_maxthreads i = maxthreads := i
9992
let set_max_number_of_threads_queued =
100-
_PREEMTIMPLEM_.set_max_number_of_threads_queued
93+
Lwt_preemptive.set_max_number_of_threads_queued
10194
let set_max_number_of_connections i = max_number_of_connections := i
10295
let set_client_timeout i = silent_client_timeout := i
10396
let set_server_timeout i = silent_server_timeout := i
@@ -143,7 +136,7 @@ let get_default_group () = !default_group
143136
let get_minthreads () = !minthreads
144137
let get_maxthreads () = !maxthreads
145138
let get_max_number_of_threads_queued =
146-
_PREEMTIMPLEM_.get_max_number_of_threads_queued
139+
Lwt_preemptive.get_max_number_of_threads_queued
147140
let get_max_number_of_connections () = !max_number_of_connections
148141
let get_client_timeout () = !silent_client_timeout
149142
let get_server_timeout () = !silent_server_timeout
@@ -175,5 +168,4 @@ let display_version () =
175168
print_newline ();
176169
exit 0
177170

178-
let init_preempt =
179-
_PREEMTIMPLEM_.init
171+
let init_preempt = Lwt_preemptive.init

0 commit comments

Comments
 (0)