I'm using the Threading library to background-load hundreds of poker hands from KeyValueStore2, while the user plays new poker hands in the foreground.
I noticed that when I save the most recent poker hand into KVS2, it stops the background thread. In other words, doing a Put when another thread is doing Gets (on separate records) is causing the background thread to stop (with an "unsupported type 84" exception).
Question: Is there a clean way to read records from KVS2 while also writing to it? Or should I just keep restarting the background load after each save, until eventually it catches up? Other ways to handle this?
I'm new to threads (and KVS2), so any tips much appreciated.
I noticed that when I save the most recent poker hand into KVS2, it stops the background thread. In other words, doing a Put when another thread is doing Gets (on separate records) is causing the background thread to stop (with an "unsupported type 84" exception).
Question: Is there a clean way to read records from KVS2 while also writing to it? Or should I just keep restarting the background load after each save, until eventually it catches up? Other ways to handle this?
I'm new to threads (and KVS2), so any tips much appreciated.