简体   繁体   中英

I want to simultaneously write and read numeric values in two different python scripts

I am designing a traffic light signal based on image processing. I get the traffic congestion as a numeric value. I am using a RaspberryPi. I have to design a working model. Now the problem is I use time.sleep() to generate delays in the switching of lights. But during this time I cant do any other processing. so I want to write the numeric values some where and access them in a separate script.

I agree with Zindarod on multiprocessing, especially during the proof of concept phase. If you hope to hook this up at scale then I'd recommend a different system architecture. Each raspberry pi is a client which communicates with a server. This will help logically abstract tasks and make it easier to integrate with celery or other asynch task management tools.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM