From 9fb8df2f64a1ce11a62bcb31ee550812162b7e41 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 22 一月 2024 18:39:43 +0800
Subject: [PATCH] 交易金额改为2w

---
 constant.py                |    2 +-
 test/test_shared_memery.py |   23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/constant.py b/constant.py
index 0de9bae..02ab0aa 100644
--- a/constant.py
+++ b/constant.py
@@ -148,7 +148,7 @@
 ########鍗庨懌閰嶇疆########
 if not is_windows() or True:
     # 涓嬪崟1鎵�
-    BUY_MONEY_PER_CODE = 500 if constant.IS_A else 10000
+    BUY_MONEY_PER_CODE = 500 if constant.IS_A else 20000
     L2_SOURCE_TYPE = L2_SOURCE_TYPE_HUAXIN
     JUEJIN_LOCAL_API = False
     TRADE_WAY = TRADE_WAY_HUAXIN
diff --git a/test/test_shared_memery.py b/test/test_shared_memery.py
new file mode 100644
index 0000000..a551425
--- /dev/null
+++ b/test/test_shared_memery.py
@@ -0,0 +1,23 @@
+import multiprocessing.shared_memory
+
+
+def producer(shr):
+    with shr.txn() as shm:
+        for i in range(10):
+            shm[i] = i
+
+
+def consumer(shr):
+    with shr.txn() as shm:
+        for i in range(10):
+            print(shm[i])
+
+
+if __name__ == "__main__":
+    with multiprocessing.shared_memory.SharedMemory(create=True, size=80) as shr:
+        p1 = multiprocessing.Process(target=producer, args=(shr,))
+        p2 = multiprocessing.Process(target=consumer, args=(shr,))
+        p1.start()
+        p2.start()
+        p1.join()
+        p2.join()

--
Gitblit v1.8.0