-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Version : branch master
OS: macOS big sur version 11.6
The scenario:
I'm using this module in an algotrading bot app.
One mechanism I'm driving with this is helping the bot get quick updates from other process which is responsible of transmitting price updates.
The dictionary is a smart move as it is the right tool for the job. Process A fill a dictionary with prices . Process B consume those prices and makes math calculations based on them.
My Issue .
As the bot run inside a while loop , it never really exits gracefully but through an interrupt (SIGINT , then SIGTERM)
if the Producer of dict(Process A) exit by SIGINT its fine. but if Process B (consumer) exit by SIGINT the dictionary seems to enter a state which you can't clear it even with unlink() and close(). only restart helps with this scenario (checked /dev/shm but /shm does not exist on my hd)
That lad me to try the shared lock mechanism (because I thought it might help with accessing this map with a lock)
When I run the code again I was given an error stating "atomics" is not found. after a short pip install atomics I found out they don't have a wheel for Mac arm wheel but only universal one. when running again I get the error of "mech-o:wrong architecture"
even if I exclude t "shared lock=true" it keeps throw errors on the same thing. a restart to the computer is the only thing which clears that thing.
I suggest sort this quick as MacBook m1 computers are not that rare and it's actually a quite great library which I'm currently cannot really use :\