i would like to know.. does Yii supports Asynchronous script execution or multi threading ?
I am in a situation of sending 4 ( to : accounting det, user, created-person, admin) emails when a user update the profile.
I am almost done with my requirement but unfortunately the php page takes too much time, more than 12 seconds to load which is not a good practice.
can somebody please suggest me someway of achieving this task in less time ? any help would be highly appreciated.
Please note : in each email, content is different from one another.
Thanks in advance.
PHP does not support threads but with Pcntl extension it supports process forking. You could create a child process that will send yout emails. I guess you should not use “pcntl_wait” in your case.
http://php.net/manual/en/function.pcntl-fork.php