Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 632 Bytes

BEST-PRACTICE-GUIDE.md

File metadata and controls

12 lines (9 loc) · 632 Bytes

Best Practices

Please ensure, that:

  1. you do not have any open handles (DB connections, Files, ...) when:
  2. executing the create method
  3. you are not using objects in the child process, that are going to close shared resources (f.e. in the __destruct method)
  4. your child processes create their own handles (DB connections, Files, ...)
  5. you use the semaphore or other locking mechanisms, when accessing shared ressources

THE STRAIGHT TIP: In case you need handles (f.e. DB connections) in your child processes, open them in the onProcessCreate method and close them in the onProcessDestroy method