Hello Ignite users,

I am wondering whether the pyignite library is thread-safe. I get strange
errors when I try to run the below script. I cannot find anything about
threads in the docs at
https://apache-ignite-binary-protocol-client.readthedocs.io/en/latest/ .
Should I use the library in a different way or is multithreading simply not
supported?

from threading import Thread

import pyignite

IGNITE_PORT = 10800
WEB_HOST = '127.0.0.1'
DB_CLIENT = pyignite.Client()
DB_CLIENT.connect(WEB_HOST, IGNITE_PORT)


test_cache = DB_CLIENT.get_or_create_cache("test_cache")
test_cache.put("a", "b")
for _ in range(1000):
    Thread(target=lambda: print(test_cache.get("a"))).start()


Kind regards,

Stéphane Thibaud

Reply via email to