nitcorn: intro module to simplify pthreads support
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 16 Oct 2016 14:06:58 +0000 (10:06 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sat, 4 Feb 2017 21:08:38 +0000 (16:08 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/nitcorn/pthreads.nit [new file with mode: 0644]

diff --git a/lib/nitcorn/pthreads.nit b/lib/nitcorn/pthreads.nit
new file mode 100644 (file)
index 0000000..484ab36
--- /dev/null
@@ -0,0 +1,27 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Activate the use of pthreads with `nitcorn`
+module pthreads
+
+import nitcorn
+import ::pthreads
+
+redef class HttpFactory
+       redef init and_libevent
+       do
+               use_pthreads
+               super
+       end
+end