Changeset: 33575129c1a7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/33575129c1a7
Branch: Sep2022
Log Message:

Merge with Jan2022 branch.


diffs (49 lines):

diff --git a/sql/test/concurrent/Tests/many-concurrent-client-connections.py 
b/sql/test/concurrent/Tests/many-concurrent-client-connections.SQL.py
rename from sql/test/concurrent/Tests/many-concurrent-client-connections.py
rename to sql/test/concurrent/Tests/many-concurrent-client-connections.SQL.py
--- a/sql/test/concurrent/Tests/many-concurrent-client-connections.py
+++ b/sql/test/concurrent/Tests/many-concurrent-client-connections.SQL.py
@@ -1,5 +1,10 @@
 import os, pymonetdb
-from concurrent.futures import ProcessPoolExecutor
+from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
+
+if os.uname().sysname == 'Linux':
+    executor = ProcessPoolExecutor
+else:
+    executor = ThreadPoolExecutor
 
 h   = os.getenv('MAPIHOST')
 p   = int(os.getenv('MAPIPORT'))
@@ -16,5 +21,5 @@ def client(_):
         conn.close()
 
 
-with ProcessPoolExecutor(nr_clients) as pool:
+with executor(nr_clients) as pool:
     pool.map(client, range(nr_clients))
diff --git a/sql/test/concurrent/Tests/read-segment-after-free.SQL.py 
b/sql/test/concurrent/Tests/read-segment-after-free.SQL.py
--- a/sql/test/concurrent/Tests/read-segment-after-free.SQL.py
+++ b/sql/test/concurrent/Tests/read-segment-after-free.SQL.py
@@ -1,8 +1,13 @@
 import os, random, pymonetdb
-from concurrent.futures import ProcessPoolExecutor
+from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
 import time
 from pymonetdb.exceptions import OperationalError
 
+if os.uname().sysname == 'Linux':
+    executor = ProcessPoolExecutor
+else:
+    executor = ThreadPoolExecutor
+
 init    =   '''
             drop table if exists foo;
             create table foo (c1, c2, c3, c4, c5) AS VALUES
@@ -47,5 +52,5 @@ def client(_):
             # concurrency conflicts are allowed
             pass
 
-with ProcessPoolExecutor(nr_clients) as pool:
+with executor(nr_clients) as pool:
     pool.map(client, range(nr_clients))
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to