Administrator
2023-08-30 87a68117b9957219f17dc7830cb2b33b88a9d1d8
test/test.py
@@ -1,6 +1,27 @@
import multiprocessing
import threading
import time
from huaxin_client import l2_data_manager
from log_module import async_log_util
from log_module.log import logger_debug
def read(pipe):
    while True:
        val = pipe.recv()
        if val:
            print("read:", val)
def write(pipe):
    while True:
        pipe.send("test")
        time.sleep(1)
if __name__ == "__main__":
    l2_data_manager.upload_data("000798", "trading_order_canceled", 30997688, new_sk=True)
    p1, p2 = multiprocessing.Pipe()
    threading.Thread(target=lambda: write(p1), daemon=True).start()
    threading.Thread(target=lambda: read(p2), daemon=True).start()
    input()