PyOCL / OpenCLGA

A Python Library for Genetic Algorithm on OpenCL
MIT License
119 stars 34 forks source link

Block connections when server is preparing and resume it after server is stopped #28

Closed john-hu closed 7 years ago

john-hu commented 7 years ago

We shouldn't accept more connections when UI dispatches a prepare command because we cannot run, pause, stop any clients if they didn't prepared.

We can accept more connection when the server is created or all clients are stopped. In the client stopped, we can recycle the client by prepare them again....

kilikkuo commented 7 years ago

By using the decorator with a state machine (https://github.com/PyOCL/OpenCLGA/blob/master/OpenCLGA/ocl_ga.py#L423), we're now able to hold the interleaved operations